home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume10 / gb3 / patch2c < prev    next >
Encoding:
Internet Message Format  |  1990-08-28  |  61.1 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v11i041:  gb3 - Galactic Bloodshed, an empire-like war game [Ver. 2.0], Patch2c
  5. Message-ID: <6228@tekred.CNA.TEK.COM>
  6. Date: 28 Aug 90 19:35:16 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 2398
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: VANCLEEF@mps.ohio-state.edu
  12. Posting-number: Volume 11, Issue 41
  13. Archive-name: gb3/Patch2c
  14. Patch-To: gb3: Volume 10, Issue 1-14
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 3 (of 9)."
  25. # Contents:  patches02c server/welcome.txt
  26. # Wrapped by billr@saab on Tue Aug 28 08:54:54 1990
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patches02c' -a "${1}" != "-c" ; then 
  29.   echo shar: Renaming existing file \"'patches02c'\" to \"'patches02c.orig'\"
  30.   mv -f 'patches02c' 'patches02c.orig'
  31. fi
  32. echo shar: Extracting \"'patches02c'\" \(57315 characters\)
  33. sed "s/^X//" >'patches02c' <<'END_OF_FILE'
  34. X*** /usr/cna/billr/games/gb3/server/Makefile    Fri Jun  1 11:46:32 1990
  35. X--- server/Makefile    Tue Aug 28 08:59:20 1990
  36. X***************
  37. X*** 1,13 ****
  38. X  # Galactic Bloodshed (Robert Chansky, smq@b)
  39. X  # Makefile    (modified by billr@saab.cna.tek.com)
  40. X  
  41. X- # (the -pipe -g are for development.)
  42. X  # $UV, if used, is generally defined in the top level makefile. It's set
  43. X  # to -DBSD4_2 for BSD 4.2 derived systems (e.g. SunOS 3.X) that don't
  44. X  # have tm_zone as a member of the "tm" struct (see <time.h>).
  45. X  # $(HP) comes from top level makefile for host and port info.
  46. X! CFLAGS = -O $(UV) $(HP)
  47. X! #CFLAGS = -g $(HP)
  48. X  #CFLAGS = -pipe -g 
  49. X  
  50. X  # objects for shell
  51. X--- 1,14 ----
  52. X  # Galactic Bloodshed (Robert Chansky, smq@b)
  53. X  # Makefile    (modified by billr@saab.cna.tek.com)
  54. X  
  55. X  # $UV, if used, is generally defined in the top level makefile. It's set
  56. X  # to -DBSD4_2 for BSD 4.2 derived systems (e.g. SunOS 3.X) that don't
  57. X  # have tm_zone as a member of the "tm" struct (see <time.h>).
  58. X  # $(HP) comes from top level makefile for host and port info.
  59. X! # Define NO_LOG1P if your system does not have log1p(x).
  60. X! # (The -pipe -g are for development.)
  61. X! DEFINES = #-DNO_LOG1P
  62. X! CFLAGS = -O $(UV) $(HP) $(DEFINES)
  63. X  #CFLAGS = -pipe -g 
  64. X  
  65. X  # objects for shell
  66. X***************
  67. X*** 30,38 ****
  68. X--- 31,41 ----
  69. X      perm.o        \
  70. X      prof.o        \
  71. X      GB_server.o    \
  72. X+     disolve.o    \
  73. X      name.o        \
  74. X      fire.o        \
  75. X      land.o        \
  76. X+     dock.o        \
  77. X      tech.o        \
  78. X      map.o        \
  79. X      max.o        \
  80. X***************
  81. X*** 66,71 ****
  82. X--- 69,75 ----
  83. X  
  84. X  # depend on vars.h and races.h
  85. X  VROBJS = getplace.o    \
  86. X+     disolve.o    \
  87. X      autoreport.o    \
  88. X      order.o        \
  89. X      mobiliz.o    \
  90. X***************
  91. X*** 107,112 ****
  92. X--- 111,117 ----
  93. X  
  94. X  # depend on ships.h and vars.h
  95. X  SHIPOBJS = autoreport.o    \
  96. X+     dissolve.o    \
  97. X      order.o        \
  98. X      shootblast.o    \
  99. X      makeplanet.o    \
  100. X***************
  101. X*** 122,127 ****
  102. X--- 127,133 ----
  103. X      enrol.o        \
  104. X      fire.o        \
  105. X      land.o        \
  106. X+     dock.o        \
  107. X      map.o        \
  108. X      max.o        \
  109. X      move.o        \
  110. X***************
  111. X*** 150,156 ****
  112. X      doturn.o     \
  113. X      enrol.o     \
  114. X      files.o        \
  115. X!     GB.o         \
  116. X      build.o        \
  117. X      power.o     \
  118. X      daemon.o    \
  119. X--- 156,162 ----
  120. X      doturn.o     \
  121. X      enrol.o     \
  122. X      files.o        \
  123. X!     GB_server.o     \
  124. X      build.o        \
  125. X      power.o     \
  126. X      daemon.o    \
  127. X***************
  128. X*** 192,205 ****
  129. X  ${SHIPOBJS}: vars.h ships.h
  130. X  ${FOBJS}: files.h
  131. X  build.o : vars.h ships.h races.h shipdata.h
  132. X! power.o files_shl.o : power.h
  133. X! doturn.o doship.o doplanet.o moveship.o moveplanet.o : doturn.h
  134. X  moveship.o : vars.h ships.h shipdata.h
  135. X  doturn.o doplanet.o doship.o : power.h
  136. X  
  137. X  #fix it program
  138. X  fix : ${FIXOBJS}
  139. X!     cc -o fix ${FIXOBJS} -lcurses -ltermcap -lm
  140. X  
  141. X  #sizes : vars.h ships.h races.h
  142. X  #     sizes.c
  143. X--- 198,211 ----
  144. X  ${SHIPOBJS}: vars.h ships.h
  145. X  ${FOBJS}: files.h
  146. X  build.o : vars.h ships.h races.h shipdata.h
  147. X! power.o dissolve.o files_shl.o : power.h
  148. X! dissolve.o doturn.o doship.o doplanet.o moveship.o moveplanet.o : doturn.h
  149. X  moveship.o : vars.h ships.h shipdata.h
  150. X  doturn.o doplanet.o doship.o : power.h
  151. X  
  152. X  #fix it program
  153. X  fix : ${FIXOBJS}
  154. X!     ${CC} -o fix ${FIXOBJS} -lcurses -ltermcap -lm
  155. X  
  156. X  #sizes : vars.h ships.h races.h
  157. X  #     sizes.c
  158. X***************
  159. X*** 206,231 ****
  160. X  
  161. X  # make data files program
  162. X  makeuniv : makeuniv.o makeplanet.o rand.o perm.o
  163. X!     cc -o makeuniv makeuniv.o makeplanet.o rand.o perm.o files.o -lm
  164. X  makeuniv.o : power.h
  165. X  
  166. X  
  167. X  # the daemon (actually it calls the update)
  168. X  GB_daemon : daemon.o
  169. X!     cc -o GB_daemon daemon.o
  170. X  
  171. X  # the enrollment program
  172. X  GB_enroll : ${EOBJS}
  173. X!     cc -o GB_enroll ${EOBJS} -lcurses -ltermcap -lm
  174. X  enrol.o : vars.h ships.h shipdata.h races.h
  175. X  
  176. X  # more clone
  177. X! mor : more.c
  178. X!     cc -g -o mor more.c
  179. X  
  180. X! #trav
  181. X! trav : traverse.o files_rw.o files_shl.o files.o
  182. X!     cc -o trav traverse.o files_rw.o files_shl.o files.o
  183. X  
  184. X  chmod:
  185. X      chmod ag+xs GB
  186. X--- 212,236 ----
  187. X  
  188. X  # make data files program
  189. X  makeuniv : makeuniv.o makeplanet.o rand.o perm.o
  190. X!     ${CC} -o makeuniv makeuniv.o makeplanet.o rand.o perm.o files.o -lm
  191. X  makeuniv.o : power.h
  192. X  
  193. X  
  194. X  # the daemon (actually it calls the update)
  195. X  GB_daemon : daemon.o
  196. X!     ${CC} -o GB_daemon daemon.o
  197. X  
  198. X  # the enrollment program
  199. X  GB_enroll : ${EOBJS}
  200. X!     ${CC} -o GB_enroll ${EOBJS} -lcurses -ltermcap -lm
  201. X  enrol.o : vars.h ships.h shipdata.h races.h
  202. X  
  203. X  # more clone
  204. X! # mor : more.c
  205. X! #     ${CC} -g -o mor more.c
  206. X  
  207. X! # trav : traverse.o files_rw.o files_shl.o files.o
  208. X! #     ${CC} -o trav traverse.o files_rw.o files_shl.o files.o
  209. X  
  210. X  chmod:
  211. X      chmod ag+xs GB
  212. X***************
  213. X*** 251,257 ****
  214. X  shar:
  215. X      /bin/cp Docs/*.doc* .
  216. X  #    -uncompress enroll.dat.Z *.doc*
  217. X!     shar README Makefile *.script *.doc *.h *.c planet.list *.dat > GB.shar
  218. X  #    -compress enroll.dat
  219. X  #    compress GB.shar
  220. X      /bin/rm -f *.doc
  221. X--- 256,262 ----
  222. X  shar:
  223. X      /bin/cp Docs/*.doc* .
  224. X  #    -uncompress enroll.dat.Z *.doc*
  225. X!     shar README Makefile *.doc *.h *.c planet.list *.dat > GB.shar
  226. X  #    -compress enroll.dat
  227. X  #    compress GB.shar
  228. X      /bin/rm -f *.doc
  229. X*** /usr/cna/billr/games/gb3/server/VN.c    Wed May 30 15:12:50 1990
  230. X--- server/VN.c    Thu Aug 23 16:54:36 1990
  231. X***************
  232. X*** 24,29 ****
  233. X--- 24,30 ----
  234. X  planettype *p;
  235. X  char buf[300];
  236. X  
  237. X+ 
  238. X    if (ship->on) {
  239. X  
  240. X      if (ship->whatorbits==LEVEL_PLAN)
  241. X***************
  242. X*** 163,168 ****
  243. X--- 164,170 ----
  244. X  planettype *planet;
  245. X  {
  246. X   reg int i;
  247. X+ float getmass();
  248. X  
  249. X       if (ship->on) {
  250. X  
  251. X***************
  252. X*** 213,224 ****
  253. X  
  254. X      s2->armor = Shipdata[shipbuild][ABIL_ARMOR];
  255. X      s2->guns = Shipdata[shipbuild][ABIL_GUNS];
  256. X-     s2->size = Shipdata[shipbuild][ABIL_TARGET];
  257. X      s2->max_crew = Shipdata[shipbuild][ABIL_MAXCREW];
  258. X      s2->max_resource = Shipdata[shipbuild][ABIL_CARGO];
  259. X      s2->max_fuel = Shipdata[shipbuild][ABIL_FUELCAP];
  260. X      s2->max_destruct = Shipdata[shipbuild][ABIL_DESTCAP];
  261. X      s2->max_speed = Shipdata[shipbuild][ABIL_SPEED];
  262. X         s2->base_mass = getmass(s2);
  263. X  
  264. X         s2->mass = s2->base_mass;
  265. X--- 215,226 ----
  266. X  
  267. X      s2->armor = Shipdata[shipbuild][ABIL_ARMOR];
  268. X      s2->guns = Shipdata[shipbuild][ABIL_GUNS];
  269. X      s2->max_crew = Shipdata[shipbuild][ABIL_MAXCREW];
  270. X      s2->max_resource = Shipdata[shipbuild][ABIL_CARGO];
  271. X      s2->max_fuel = Shipdata[shipbuild][ABIL_FUELCAP];
  272. X      s2->max_destruct = Shipdata[shipbuild][ABIL_DESTCAP];
  273. X      s2->max_speed = Shipdata[shipbuild][ABIL_SPEED];
  274. X+     s2->size = ship_size(s2);
  275. X         s2->base_mass = getmass(s2);
  276. X  
  277. X         s2->mass = s2->base_mass;
  278. X***************
  279. X*** 237,242 ****
  280. X--- 239,248 ----
  281. X            s2->bombard = 1;
  282. X            s2->protect.self = 1;
  283. X            s2->protect.planet = 1;
  284. X+     /* set a course for the offending player's system */
  285. X+         s2->whatdest = LEVEL_STAR;
  286. X+         s2->deststar = random()&01 ? Sdata.VN_index1[VN_brain.Most_mad-1] :
  287. X+                                 Sdata.VN_index2[VN_brain.Most_mad-1];
  288. X         } else {
  289. X            fprintf(stderr,"VN #%d constructed VN #%d.\n",shipno,Num_ships);
  290. X            s2->tech = ship->tech + 1.0;
  291. X*** /usr/cna/billr/games/gb3/server/autoshoot.c    Wed May 30 15:12:51 1990
  292. X--- server/autoshoot.c    Thu Aug 23 16:54:37 1990
  293. X***************
  294. X*** 49,55 ****
  295. X      sprintf(buf, "Bombardment of %s cancelled, PDNs are present.\n",
  296. X          prin_ship_orbits(ship));
  297. X      if(!notify(ship->owner, buf))
  298. X!     push_message(TELEG_PLAYER_AUTO, ship->owner, buf);
  299. X      return;
  300. X  }
  301. X  
  302. X--- 49,55 ----
  303. X      sprintf(buf, "Bombardment of %s cancelled, PDNs are present.\n",
  304. X          prin_ship_orbits(ship));
  305. X      if(!notify(ship->owner, buf))
  306. X!     push_message(TELEG_PLAYER_AUTO, ship->owner, buf, TELEGRAM);
  307. X      return;
  308. X  }
  309. X  
  310. X***************
  311. X*** 168,174 ****
  312. X  
  313. X  
  314. X  /* execute attack */
  315. X! 
  316. X          numdest2 = shoot(1, to, &from, i, planet, (planettype *)NULL,x,y,stren,
  317. X          &dist, tech/numretal, telegram_buf, 0);    /* (0=dont get smap) */
  318. X  
  319. X--- 168,174 ----
  320. X  
  321. X  
  322. X  /* execute attack */
  323. X!     if(numretal)
  324. X          numdest2 = shoot(1, to, &from, i, planet, (planettype *)NULL,x,y,stren,
  325. X          &dist, tech/numretal, telegram_buf, 0);    /* (0=dont get smap) */
  326. X  
  327. X*** /usr/cna/billr/games/gb3/server/daemon.c    Wed May 30 16:08:24 1990
  328. X--- server/daemon.c    Fri Aug 24 09:08:03 1990
  329. X***************
  330. X*** 42,47 ****
  331. X--- 42,53 ----
  332. X      updtime = DEFAULT_UPDATE_TIME;
  333. X  
  334. X    /* initialize the data file to feed telnet */
  335. X+   /*
  336. X+    * This is here in case a new DAEMON_PASSWORD is defined, in which
  337. X+    * case, the daemon.dat file must be updated. This costs very little
  338. X+    * in overhead (only run once) and ensure that the file is always
  339. X+    * uptodate if the password changes. (billr@saab.cna.tek.com)
  340. X+    */
  341. X    if ((fd = fopen(DAEMONFL, "w")) == NULL)
  342. X      perror("GB_daemon open of daemon.dat failed");
  343. X    else
  344. X***************
  345. X*** 60,68 ****
  346. X         update = t->tm_hour;
  347. X      printf("Requesting update\n");
  348. X      /* this will trigger the update */
  349. X-     /*
  350. X-     exstat = system("telnet pooh 2010 < daemon.dat");
  351. X-      */
  352. X      sprintf(buf,"telnet %s %d < %s", GB_HOST, GB_PORT, DAEMONFL);
  353. X      exstat = system(buf);
  354. X  
  355. X--- 66,71 ----
  356. X*** /usr/cna/billr/games/gb3/server/makeuniv.c    Wed May 30 15:13:27 1990
  357. X--- server/makeuniv.c    Thu Aug 23 16:55:11 1990
  358. X***************
  359. X*** 15,20 ****
  360. X--- 15,22 ----
  361. X  #include <math.h>
  362. X  
  363. X  
  364. X+ short list[1000];
  365. X+ 
  366. X  FILE *fopen();
  367. X  planettype Makeplanet();
  368. X  char *Numbers[] = { "1","2","3","4","5","6","7","8","9","10","11",
  369. X***************
  370. X*** 25,41 ****
  371. X  char *argv[];
  372. X  {
  373. X  FILE *teledata,*racedata,*stardata,*planetdata,*sectordata,*shipdata;
  374. X  planettype planet;
  375. X  startype *Star;
  376. X  int star,e,e2,type,lowp,hip, roll, temperature;
  377. X  register int i,y,x;
  378. X! char str[200];
  379. X  float att,xspeed[NUMSTARS],yspeed[NUMSTARS], dist, dummy;
  380. X  float xpos, ypos;
  381. X  
  382. X   srandom(getpid());
  383. X  
  384. X!  Bzero(Sdata);
  385. X   printf("# of stars(1-%d):",NUMSTARS-1);
  386. X   scanf("%d",&(Sdata.numstars));
  387. X   printf("low # of planets (1-%d):",MAXPLANETS);
  388. X--- 27,81 ----
  389. X  char *argv[];
  390. X  {
  391. X  FILE *teledata,*racedata,*stardata,*planetdata,*sectordata,*shipdata;
  392. X+ FILE *planetlist;
  393. X  planettype planet;
  394. X  startype *Star;
  395. X  int star,e,e2,type,lowp,hip, roll, temperature;
  396. X  register int i,y,x;
  397. X! char str[200], c;
  398. X  float att,xspeed[NUMSTARS],yspeed[NUMSTARS], dist, dummy;
  399. X  float xpos, ypos;
  400. X+ int autoname, numlist, namecount, t;
  401. X+ char Names[1000][20];
  402. X  
  403. X   srandom(getpid());
  404. X  
  405. X! printf("\nDo you wish to use the file '%s' for names (y/n)\?",
  406. X!        PLANETLIST);
  407. X! c = getchr();
  408. X! getchr();
  409. X! 
  410. X! autoname = (c=='y');
  411. X! 
  412. X! if(autoname) {
  413. X!     if( (planetlist = fopen(PLANETLIST, "r"))==NULL) {
  414. X!     printf("unable to open %s\n", PLANETLIST);
  415. X!     exit(-1);
  416. X!     }
  417. X! 
  418. X!     numlist=0;
  419. X!     t = 0;
  420. X!     while( (c=getc(planetlist)) != EOF) {
  421. X!     if(c!='\n') {
  422. X!         Names[numlist][t++] = c;
  423. X!     } else {
  424. X!         numlist++;
  425. X!         t = 0;
  426. X!     }
  427. X!     
  428. X!     }
  429. X!     numlist--;
  430. X!     close(planetlist);
  431. X! 
  432. X! printf("%d names listed in %s\n", numlist, PLANETLIST);
  433. X! 
  434. X! rand_list(numlist);
  435. X! 
  436. X! }
  437. X! 
  438. X! namecount = 0;
  439. X! 
  440. X! Bzero(Sdata);
  441. X   printf("# of stars(1-%d):",NUMSTARS-1);
  442. X   scanf("%d",&(Sdata.numstars));
  443. X   printf("low # of planets (1-%d):",MAXPLANETS);
  444. X***************
  445. X*** 56,62 ****
  446. X      exit(-1);
  447. X   }
  448. X  
  449. X!   /* get names, positions of stars first */
  450. X   for (star=0; star<Sdata.numstars; star++) {
  451. X       Stars[star]=(startype *)malloc(sizeof(startype));
  452. X       Bzero(*Stars[star]);
  453. X--- 96,103 ----
  454. X      exit(-1);
  455. X   }
  456. X  
  457. X! 
  458. X! /* get names, positions of stars first */
  459. X   for (star=0; star<Sdata.numstars; star++) {
  460. X       Stars[star]=(startype *)malloc(sizeof(startype));
  461. X       Bzero(*Stars[star]);
  462. X***************
  463. X*** 65,70 ****
  464. X--- 106,115 ----
  465. X      Star->temperature=int_rand(0, 4)+int_rand(1, 5);
  466. X          /* heat of the star */
  467. X       Star->gravity = int_rand(10000,100000) / 100.0;
  468. X+ 
  469. X+     if(autoname && (namecount <= numlist)) {
  470. X+         sprintf(Star->name, "%s", Names[list[namecount++]]);
  471. X+     } else {
  472. X       printf("[%d] name of star (%d planets):",star, Star->numplanets);
  473. X      for (i=0; i<NAMESIZE-4; i++)
  474. X         putchr('.');
  475. X***************
  476. X*** 72,77 ****
  477. X--- 117,124 ----
  478. X         putchr('\010');        /* ^H */
  479. X       scanf("%14[^\n]",Star->name);
  480. X        getchr();
  481. X+         }
  482. X+     
  483. X       Star->xpos=(float)int_rand(-UNIVSIZE,UNIVSIZE);
  484. X      xspeed[star] = 0;
  485. X       Star->ypos=(float)int_rand(-UNIVSIZE,UNIVSIZE);
  486. X***************
  487. X*** 83,90 ****
  488. X    Star = Stars[star];
  489. X  
  490. X    for (i=0; i<Star->numplanets; i++)  {
  491. X-     sprintf(Star->pnames[i],"%s",Numbers[i]);
  492. X  
  493. X      dist = -1.0;
  494. X      while (dist >= SYSTEMSIZE || dist <= 100.0) {
  495. X        xpos=(float)int_rand(-SYSTEMSIZE,SYSTEMSIZE);
  496. X--- 130,141 ----
  497. X    Star = Stars[star];
  498. X  
  499. X    for (i=0; i<Star->numplanets; i++)  {
  500. X  
  501. X+         if(autoname && (namecount <= numlist))
  502. X+         sprintf(Star->pnames[i],"%s", Names[list[namecount++]]);
  503. X+     else
  504. X+         sprintf(Star->pnames[i],"%s",Numbers[i]);
  505. X+ 
  506. X      dist = -1.0;
  507. X      while (dist >= SYSTEMSIZE || dist <= 100.0) {
  508. X        xpos=(float)int_rand(-SYSTEMSIZE,SYSTEMSIZE);
  509. X***************
  510. X*** 114,124 ****
  511. X          else
  512. X              type = TYPE_WATER;
  513. X      } else if(temperature > -10 && temperature <= 30) {
  514. X!         if(roll <=25)
  515. X              type = TYPE_ASTEROID;
  516. X!         else if(roll > 25 && roll <=50)
  517. X              type = TYPE_AIRLESS;
  518. X!         else if(roll > 50 && roll <=75)
  519. X              type = TYPE_EARTH;
  520. X          else
  521. X              type = TYPE_WATER;
  522. X--- 165,175 ----
  523. X          else
  524. X              type = TYPE_WATER;
  525. X      } else if(temperature > -10 && temperature <= 30) {
  526. X!         if(roll <=10)
  527. X              type = TYPE_ASTEROID;
  528. X!         else if(roll > 15 && roll <=40)
  529. X              type = TYPE_AIRLESS;
  530. X!         else if(roll > 40 && roll <=70)
  531. X              type = TYPE_EARTH;
  532. X          else
  533. X              type = TYPE_WATER;
  534. X***************
  535. X*** 285,291 ****
  536. X   chmod(TELEGRAMDIR, 00770);
  537. X  
  538. X      /* make telegram files for each player */
  539. X!  for (i=1; i<=MAXPLAYERS; i++) {
  540. X       sprintf(str, "%s.%d", TELEGRAMFL, i );
  541. X       if ((teledata = fopen(str, "w+"))==NULL) {
  542. X          printf(" unable to open %s\n",str);
  543. X--- 336,342 ----
  544. X   chmod(TELEGRAMDIR, 00770);
  545. X  
  546. X      /* make telegram files for each player */
  547. X!  for (i=1; i<MAXPLAYERS; i++) {
  548. X       sprintf(str, "%s.%d", TELEGRAMFL, i );
  549. X       if ((teledata = fopen(str, "w+"))==NULL) {
  550. X          printf(" unable to open %s\n",str);
  551. X***************
  552. X*** 293,297 ****
  553. X          fchmod(teledata,00660);
  554. X          fclose(teledata);
  555. X      }
  556. X!    }
  557. X  }
  558. X--- 344,407 ----
  559. X          fchmod(teledata,00660);
  560. X          fclose(teledata);
  561. X      }
  562. X!     }
  563. X! 
  564. X!  sprintf(str, "/bin/mkdir %s", NEWSDIR );
  565. X!  system(str);
  566. X!  chmod(NEWSDIR, 00770);
  567. X! 
  568. X!     /* make news files for each player */
  569. X!  for (i=1; i<MAXPLAYERS; i++) {
  570. X!      sprintf(str, "%s.%d", DECLARATIONFL, i );
  571. X!      if ((teledata = fopen(str, "w+"))==NULL)
  572. X!         printf(" unable to open %s\n",str);
  573. X!     else {
  574. X!         fchmod(teledata,00660);
  575. X!         fclose(teledata);
  576. X!     }
  577. X!      sprintf(str, "%s.%d", TRANSFERFL, i );
  578. X!      if ((teledata = fopen(str, "w+"))==NULL)
  579. X!         printf(" unable to open %s\n",str);
  580. X!     else {
  581. X!         fchmod(teledata,00660);
  582. X!         fclose(teledata);
  583. X!     }
  584. X!      sprintf(str, "%s.%d", COMBATFL, i );
  585. X!      if ((teledata = fopen(str, "w+"))==NULL)
  586. X!         printf(" unable to open %s\n",str);
  587. X!     else {
  588. X!         fchmod(teledata,00660);
  589. X!         fclose(teledata);
  590. X!     }
  591. X!      sprintf(str, "%s.%d", ANNOUNCEFL, i );
  592. X!      if ((teledata = fopen(str, "w+"))==NULL)
  593. X!         printf(" unable to open %s\n",str);
  594. X!     else {
  595. X!         fchmod(teledata,00660);
  596. X!         fclose(teledata);
  597. X!     }
  598. X!     }
  599. X! 
  600. X! 
  601. X! printf("%d bodies named.\n", namecount);
  602. X! }
  603. X! 
  604. X! rand_list(n) /* mix up the numbers 0 thru n */
  605. X! int n;
  606. X! {
  607. X! short nums[1000], i, j, k;
  608. X!        for(i=0; i<1000; i++)
  609. X!        nums[i]=i;
  610. X! 
  611. X! /* create mix up the list */
  612. X! j = 0;
  613. X! while(j<=n) {
  614. X!    k=int_rand(0, n-j);
  615. X!    list[j]=nums[k];
  616. X! 
  617. X!    for(i=k; i<n-j; i++)
  618. X!        nums[i]=nums[i+1];
  619. X!        
  620. X!    j++;
  621. X!   }
  622. X  }
  623. X*** /usr/cna/billr/games/gb3/server/max.c    Wed May 30 15:13:29 1990
  624. X--- server/max.c    Fri Aug 24 16:40:34 1990
  625. X***************
  626. X*** 27,36 ****
  627. X  {
  628. X  int val;
  629. X  float a,b;
  630. X! a=FACTOR_FERT_SUPPORT * (log1p((double)1.*p->eff)  * log1p((double)p->fert)+1.0);
  631. X! b=.01 * ((r==NULL) ? 0.0 : r->likes[p->des])
  632. X!     * (MAX(0.0, MIN(100.0, c+20.0*(r->number_sexes-2)))); 
  633. X! 
  634. X  
  635. X  val = (int)( a * b * .01 * (100.0 - (float)toxic) );
  636. X  
  637. X--- 27,34 ----
  638. X  {
  639. X  int val;
  640. X  float a,b;
  641. X! a=FACTOR_FERT_SUPPORT * (log1p((double)p->eff+1.0)  * log1p((double)p->fert)+1.0);
  642. X! b=.01 * c *((r==NULL) ? 0.0 : MAX(0.0, MIN(r->likes[p->des]  + 0.2*(r->number_sexes - 2), 1.0)) );
  643. X  
  644. X  val = (int)( a * b * .01 * (100.0 - (float)toxic) );
  645. X  
  646. X*** /usr/cna/billr/games/gb3/server/mobiliz.c    Wed May 30 15:13:31 1990
  647. X--- server/mobiliz.c    Thu Aug 23 16:55:14 1990
  648. X***************
  649. X*** 49,54 ****
  650. X--- 49,55 ----
  651. X      sprintf(buf, "Current mobilization: %d    Quota: %d\n", 
  652. X              p->info[Playernum-1].comread, p->info[Playernum-1].mob_set);
  653. X      notify(Playernum, buf);
  654. X+         free(p);
  655. X          return;
  656. X          }
  657. X  
  658. X***************
  659. X*** 59,71 ****
  660. X      if (sum_mob > 100 || sum_mob < 0) {
  661. X          sprintf(buf,"Illegal value.\n");
  662. X              notify(Playernum, buf);
  663. X          return;
  664. X      }
  665. X  
  666. X  
  667. X      p->info[Playernum-1].mob_set = sum_mob;
  668. X! openpdata(&mobilize_pdata);
  669. X! putplanet(mobilize_pdata,p,Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
  670. X       close_file(mobilize_pdata);
  671. X  
  672. X      deductAPs(Playernum,APcount, Dir[Playernum-1].snum, 0);
  673. X--- 60,73 ----
  674. X      if (sum_mob > 100 || sum_mob < 0) {
  675. X          sprintf(buf,"Illegal value.\n");
  676. X              notify(Playernum, buf);
  677. X+         free(p);
  678. X          return;
  679. X      }
  680. X  
  681. X  
  682. X      p->info[Playernum-1].mob_set = sum_mob;
  683. X!     openpdata(&mobilize_pdata);
  684. X!     putplanet(mobilize_pdata,p,Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
  685. X       close_file(mobilize_pdata);
  686. X  
  687. X      deductAPs(Playernum,APcount, Dir[Playernum-1].snum, 0);
  688. X*** /usr/cna/billr/games/gb3/server/planet.list    Wed May 30 15:13:58 1990
  689. X--- server/planet.list    Thu Aug 23 16:55:40 1990
  690. X***************
  691. X*** 1,4 ****
  692. X- 
  693. X  Arioch
  694. X  Amaterasu
  695. X  Azagthoth
  696. X--- 1,3 ----
  697. X***************
  698. X*** 82,88 ****
  699. X  Granis
  700. X  Gungnir
  701. X  Halloway
  702. X- Harry'sWorld
  703. X  Halvec
  704. X  Hal
  705. X  Hadad
  706. X--- 81,86 ----
  707. X***************
  708. X*** 150,157 ****
  709. X  Mandara
  710. X  Manitou
  711. X  Marduk
  712. X! (Mashyane
  713. X! Mashye)
  714. X  Megara
  715. X  Menrua
  716. X  Metis
  717. X--- 148,155 ----
  718. X  Mandara
  719. X  Manitou
  720. X  Marduk
  721. X! Mashyane
  722. X! Mashye
  723. X  Megara
  724. X  Menrua
  725. X  Metis
  726. X***************
  727. X*** 159,165 ****
  728. X  Mulungu
  729. X  Nyarlathotep
  730. X  Nessus
  731. X- NewBeginnings
  732. X  Nuada
  733. X  Nebo
  734. X  Ninhursag
  735. X--- 157,162 ----
  736. X***************
  737. X*** 180,187 ****
  738. X  Oro
  739. X  Orunila
  740. X  Otus
  741. X- PlanetX
  742. X- Planet10
  743. X  Pleides
  744. X  Pachacutil
  745. X  Pandavas
  746. X--- 177,182 ----
  747. X***************
  748. X*** 292,294 ****
  749. X--- 287,563 ----
  750. X  Zethus
  751. X  Zocho
  752. X  Zurvan
  753. X+ Pegasus
  754. X+ Cylon
  755. X+ Ares
  756. X+ Taurus
  757. X+ Gemini
  758. X+ Cancer
  759. X+ Leo
  760. X+ Virgo
  761. X+ Libra
  762. X+ Scorpio
  763. X+ Sagittarius
  764. X+ Capricorn
  765. X+ Aquarius
  766. X+ Pisces
  767. X+ Mercury
  768. X+ Venus
  769. X+ Terra
  770. X+ Mars
  771. X+ Jupiter
  772. X+ Saturn
  773. X+ Uranus
  774. X+ Neptune
  775. X+ Pluto
  776. X+ Galactica
  777. X+ Andromeda
  778. X+ Perseus
  779. X+ Dalos
  780. X+ Erusa
  781. X+ Lamarna
  782. X+ Deneb
  783. X+ Cygnus
  784. X+ Rigel
  785. X+ Regulus
  786. X+ Aldebran
  787. X+ Lyra
  788. X+ Vega
  789. X+ Aquila
  790. X+ Procyon
  791. X+ Sirius
  792. X+ Trantor
  793. X+ Caneb
  794. X+ Indis
  795. X+ Cetelus
  796. X+ Cetus
  797. X+ Citurnae
  798. X+ Sardonis
  799. X+ Zarg
  800. X+ Urdanis
  801. X+ Tarkus
  802. X+ Crux
  803. X+ Fantor
  804. X+ Zog
  805. X+ Xantor
  806. X+ Qrdus
  807. X+ Mordus
  808. X+ Remulak
  809. X+ Meepzorp
  810. X+ Zot
  811. X+ Varnak
  812. X+ Klingon
  813. X+ Romulus
  814. X+ Remus
  815. X+ Vulcan
  816. X+ Sarnak
  817. X+ Tarsus
  818. X+ Gamorae
  819. X+ Delphia
  820. X+ Uhura
  821. X+ Logan
  822. X+ Primax
  823. X+ Ectoprimax
  824. X+ Endoprimax
  825. X+ Orthoprimax
  826. X+ Oz
  827. X+ Jhurna
  828. X+ Karnak
  829. X+ Og
  830. X+ Io
  831. X+ Tarnesus
  832. X+ Huron
  833. X+ Ophiucus
  834. X+ Andor
  835. X+ Chaos
  836. X+ Cthulhu
  837. X+ Persephone
  838. X+ Sagurak
  839. X+ Oliphant
  840. X+ Olympus
  841. X+ Imperium
  842. X+ Illiam
  843. X+ Athena
  844. X+ Apollo
  845. X+ Dionysus
  846. X+ Bacchus
  847. X+ Zeus
  848. X+ Hera
  849. X+ Aphrodite
  850. X+ Hephiastes
  851. X+ Yrga
  852. X+ Reggae
  853. X+ Crassus
  854. X+ Draco
  855. X+ Ephraites
  856. X+ Betelgeuse
  857. X+ Magna
  858. X+ Nardis
  859. X+ Nemesis
  860. X+ Centauri
  861. X+ Shax
  862. X+ Xerxes
  863. X+ Piithar
  864. X+ Ibanis
  865. X+ Carthage
  866. X+ Eldorado
  867. X+ Pymeria
  868. X+ Ursa
  869. X+ Interigon
  870. X+ Rol
  871. X+ Pollux
  872. X+ Castor
  873. X+ Sedaria
  874. X+ Iki
  875. X+ Hestia
  876. X+ Polaris
  877. X+ Medusa
  878. X+ Hyperion
  879. X+ Fredux
  880. X+ Gabora
  881. X+ Val
  882. X+ Gnur
  883. X+ Jena
  884. X+ Resida
  885. X+ Ghal
  886. X+ Cranus
  887. X+ Zaaxon
  888. X+ Cassiopeia
  889. X+ Ergos
  890. X+ Sega
  891. X+ Tranus
  892. X+ Oox
  893. X+ Sekasis
  894. X+ Alpha
  895. X+ Beta
  896. X+ Gamma
  897. X+ Delta
  898. X+ Epsilon
  899. X+ Zeta
  900. X+ Eta
  901. X+ Theta
  902. X+ Iota
  903. X+ Kappa
  904. X+ Lambda
  905. X+ Mu
  906. X+ Nu
  907. X+ Xi
  908. X+ Omicron
  909. X+ Pi
  910. X+ Rho
  911. X+ Sigma
  912. X+ Tau
  913. X+ Upsilon
  914. X+ Phi
  915. X+ Chi
  916. X+ Psi
  917. X+ Omega
  918. X+ Claire
  919. X+ Pthura
  920. X+ Deganus
  921. X+ Bora
  922. X+ Cepheus
  923. X+ Hercules
  924. X+ Magellan
  925. X+ Galileo
  926. X+ Americos
  927. X+ Britannia
  928. X+ Lupus
  929. X+ Lugundum
  930. X+ Atlantis
  931. X+ Suboceana
  932. X+ Oceana
  933. X+ Eurasia
  934. X+ Peace
  935. X+ War
  936. X+ Tyrrea
  937. X+ Poseiden
  938. X+ Vurat
  939. X+ Drak
  940. X+ Rimahad
  941. X+ Lod
  942. X+ Troll
  943. X+ Dearth
  944. X+ Ulka
  945. X+ Vesta
  946. X+ Eegos
  947. X+ Sal
  948. X+ Proteus
  949. X+ Boz
  950. X+ Lhard
  951. X+ Nada
  952. X+ Miriam
  953. X+ Xrka
  954. X+ Ord
  955. X+ Jazdarnil
  956. X+ Kepa
  957. X+ Zrd
  958. X+ Ixmirsis
  959. X+ Megnazon
  960. X+ Terl
  961. X+ Naiad
  962. X+ Thalassa
  963. X+ Despoina
  964. X+ Galatea
  965. X+ Larissa
  966. X+ Proteus
  967. X+ Triton
  968. X+ Nereid
  969. X+ Charon
  970. X+ Cordelia
  971. X+ Ophelia
  972. X+ Bianca
  973. X+ Cressida
  974. X+ Desdemona
  975. X+ Juliet
  976. X+ Rosalind
  977. X+ Belinda
  978. X+ Puck
  979. X+ Miranda
  980. X+ Ariel
  981. X+ Umbriel
  982. X+ Titania
  983. X+ Oberon
  984. X+ Atlas
  985. X+ Prometheus
  986. X+ Pandora
  987. X+ Janus
  988. X+ Epimetheus
  989. X+ Mimas
  990. X+ Enceladus
  991. X+ Tethys
  992. X+ Telesto
  993. X+ Calypso
  994. X+ Dione
  995. X+ Helene
  996. X+ Titan
  997. X+ Iapetus
  998. X+ Hyperion
  999. X+ Phoebe
  1000. X+ Sinope
  1001. X+ Pasiphae
  1002. X+ Carme
  1003. X+ Ananke
  1004. X+ Elara
  1005. X+ Lysithea
  1006. X+ Himalia
  1007. X+ Leda
  1008. X+ Callisto
  1009. X+ Ganymede
  1010. X+ Europa
  1011. X+ Thebe
  1012. X+ Amalthea
  1013. X+ Metis
  1014. X+ Adrastea
  1015. X+ Phobos
  1016. X+ Deimos
  1017. X+ Chiron
  1018. X+ Mercury
  1019. X+ Venus
  1020. X+ Terra
  1021. X+ Mars
  1022. X+ Jupiter
  1023. X+ Saturn
  1024. X+ Uranus
  1025. X+ Neptune
  1026. X+ Pluto
  1027. X*** /usr/cna/billr/games/gb3/server/prof.c    Wed May 30 15:13:43 1990
  1028. X--- server/prof.c    Thu Aug 23 16:55:24 1990
  1029. X***************
  1030. X*** 24,29 ****
  1031. X--- 24,30 ----
  1032. X  char args[MAXARGS][COMMANDSIZE];
  1033. X  {
  1034. X  int i, j, numraces;
  1035. X+ racetype *Race;
  1036. X  
  1037. X  if(argn <= 1) {
  1038. X      notify(Playernum, "You must give a list of player numbers.\n");
  1039. X***************
  1040. X*** 31,47 ****
  1041. X      }
  1042. X  numraces = Numraces();
  1043. X  
  1044. X  for(i=1; i<=argn-1; i++) {
  1045. X      j=atoi(args[i]);
  1046. X      if(!(j<1 || j>numraces)) {
  1047. X! free(Race);
  1048. X! openracedata(&prof_racedata); 
  1049. X! getrace(prof_racedata, &Race, j);
  1050. X! close_file(prof_racedata);
  1051. X      sprintf(buf, "[%2d] %s\n", j, Race->name);
  1052. X      notify(Playernum, buf);
  1053. X!         }
  1054. X      }
  1055. X  
  1056. X  }
  1057. X  
  1058. X--- 32,49 ----
  1059. X      }
  1060. X  numraces = Numraces();
  1061. X  
  1062. X+ 
  1063. X+ openracedata(&prof_racedata); 
  1064. X  for(i=1; i<=argn-1; i++) {
  1065. X      j=atoi(args[i]);
  1066. X      if(!(j<1 || j>numraces)) {
  1067. X!         getrace(prof_racedata, &Race, (int)j);
  1068. X      sprintf(buf, "[%2d] %s\n", j, Race->name);
  1069. X      notify(Playernum, buf);
  1070. X!         free(Race);
  1071. X      }
  1072. X+     }
  1073. X+ close_file(prof_racedata);
  1074. X  
  1075. X  }
  1076. X  
  1077. X***************
  1078. X*** 52,60 ****
  1079. X  char args[MAXARGS][COMMANDSIZE];
  1080. X  {
  1081. X   int i, p, numraces;
  1082. X!  racetype *r;
  1083. X  
  1084. X- free(Race);
  1085. X  openracedata(&prof_racedata); 
  1086. X  getrace(prof_racedata, &Race,Playernum);
  1087. X  close_file(prof_racedata);
  1088. X--- 54,61 ----
  1089. X  char args[MAXARGS][COMMANDSIZE];
  1090. X  {
  1091. X   int i, p, numraces;
  1092. X!  racetype *r, *Race;
  1093. X  
  1094. X  openracedata(&prof_racedata); 
  1095. X  getrace(prof_racedata, &Race,Playernum);
  1096. X  close_file(prof_racedata);
  1097. X***************
  1098. X*** 139,145 ****
  1099. X  
  1100. X     GetPlayer(args[1], &p, &r);
  1101. X  
  1102. X!    if (p== -1) {
  1103. X      sprintf(buf,"Player does not exist.\n");
  1104. X          notify(Playernum, buf);
  1105. X      return;
  1106. X--- 140,146 ----
  1107. X  
  1108. X     GetPlayer(args[1], &p, &r);
  1109. X  
  1110. X!    if (p < 1 || p > Numraces() ) {
  1111. X      sprintf(buf,"Player does not exist.\n");
  1112. X          notify(Playernum, buf);
  1113. X      return;
  1114. X***************
  1115. X*** 191,210 ****
  1116. X          notify(Playernum, buf);
  1117. X    sprintf(buf," atmosphere concentrations:\n");
  1118. X          notify(Playernum, buf);
  1119. X!  sprintf(buf,"    Methane %2s%%    Oxygen %2s%%\n",
  1120. X!         Estimate_i((int)r->conditions[METHANE],Race,p), 
  1121. X          Estimate_i((int)r->conditions[OXYGEN],Race,p) );
  1122. X          notify(Playernum, buf);
  1123. X!  sprintf(buf,"        CO2 %2s%%  Hydrogen %2s%%\n", 
  1124. X!         Estimate_i((int)r->conditions[CO2],Race,p), 
  1125. X          Estimate_i((int)r->conditions[HYDROGEN],Race,p) );
  1126. X          notify(Playernum, buf);
  1127. X!   sprintf(buf,"   Nitrogen %2s%%    Sulfur %2s%%\n",
  1128. X!         Estimate_i((int)r->conditions[NITROGEN],Race,p), 
  1129. X          Estimate_i((int)r->conditions[SULFUR],Race,p) );
  1130. X          notify(Playernum, buf);
  1131. X!  sprintf(buf,"     Helium %2s%%     Other %2s%%\n", 
  1132. X!         Estimate_i((int)r->conditions[HELIUM],Race,p), 
  1133. X          Estimate_i((int)r->conditions[OTHER],Race,p) );
  1134. X  
  1135. X           notify(Playernum, buf);
  1136. X--- 192,219 ----
  1137. X          notify(Playernum, buf);
  1138. X    sprintf(buf," atmosphere concentrations:\n");
  1139. X          notify(Playernum, buf);
  1140. X!  sprintf(buf,"    Methane %2s%%",
  1141. X!         Estimate_i((int)r->conditions[METHANE],Race,p));
  1142. X!    notify(Playernum, buf);
  1143. X!    sprintf(buf, "    Oxygen %2s%%\n",
  1144. X          Estimate_i((int)r->conditions[OXYGEN],Race,p) );
  1145. X          notify(Playernum, buf);
  1146. X!  sprintf(buf,"        CO2 %2s%%",
  1147. X!         Estimate_i((int)r->conditions[CO2],Race,p));
  1148. X!    notify(Playernum, buf);
  1149. X!     sprintf(buf, "  Hydrogen %2s%%\n", 
  1150. X          Estimate_i((int)r->conditions[HYDROGEN],Race,p) );
  1151. X          notify(Playernum, buf);
  1152. X!   sprintf(buf,"   Nitrogen %2s%%",
  1153. X!         Estimate_i((int)r->conditions[NITROGEN],Race,p));
  1154. X!    notify(Playernum, buf);
  1155. X!    sprintf(buf, "    Sulfur %2s%%\n",
  1156. X          Estimate_i((int)r->conditions[SULFUR],Race,p) );
  1157. X          notify(Playernum, buf);
  1158. X!  sprintf(buf,"     Helium %2s%%",
  1159. X!         Estimate_i((int)r->conditions[HELIUM],Race,p));
  1160. X!    notify(Playernum, buf);
  1161. X!     sprintf(buf,"     Other %2s%%\n", 
  1162. X          Estimate_i((int)r->conditions[OTHER],Race,p) );
  1163. X  
  1164. X           notify(Playernum, buf);
  1165. X***************
  1166. X*** 212,219 ****
  1167. X      Race->translate[p-1]>80 ? Desnames[r->likesbest] : " ? " );
  1168. X          notify(Playernum, buf);
  1169. X  
  1170. X!   sprintf(buf,"\nTelescope ranges:   ground: %s, space: %s\n", 
  1171. X!     Estimate_f(tele_range(OTYPE_GTELE,r->tech), Race,p), 
  1172. X      Estimate_f(tele_range(OTYPE_STELE,r->tech), Race,p) );
  1173. X          notify(Playernum, buf);
  1174. X    sprintf(buf,"Gun range: %s\n", 
  1175. X--- 221,230 ----
  1176. X      Race->translate[p-1]>80 ? Desnames[r->likesbest] : " ? " );
  1177. X          notify(Playernum, buf);
  1178. X  
  1179. X!   sprintf(buf,"\nTelescope ranges:   ground: %s,",
  1180. X!     Estimate_f(tele_range(OTYPE_GTELE,r->tech), Race,p));
  1181. X!    notify(Playernum, buf);
  1182. X!  sprintf(buf, "space: %s\n", 
  1183. X      Estimate_f(tele_range(OTYPE_STELE,r->tech), Race,p) );
  1184. X          notify(Playernum, buf);
  1185. X    sprintf(buf,"Gun range: %s\n", 
  1186. X***************
  1187. X*** 220,226 ****
  1188. X--- 231,239 ----
  1189. X      Estimate_f(gun_range(r, NULL), Race,p) );
  1190. X          notify(Playernum, buf);
  1191. X  
  1192. X+     free(r);
  1193. X   }
  1194. X+ free(Race);
  1195. X  
  1196. X  }
  1197. X  
  1198. X*** /usr/cna/billr/games/gb3/server/read_teleg.c    Wed May 30 15:13:44 1990
  1199. X--- server/read_teleg.c    Thu Aug 23 16:55:25 1990
  1200. X***************
  1201. X*** 23,34 ****
  1202. X  
  1203. X  char telegram_file[PATHLEN];
  1204. X  
  1205. X! teleg_read(Playernum)
  1206. X  int Playernum;
  1207. X  {
  1208. X      char *p;
  1209. X  
  1210. X      sprintf(telegram_file,"%s.%d", TELEGRAMFL, Playernum);
  1211. X      if((teleg_read_fd = fopen(telegram_file, "r")) != 0) {
  1212. X      while(fgets(buf, sizeof buf, teleg_read_fd)) {
  1213. X          for(p = buf; *p; p++) if(*p == '\n') {
  1214. X--- 23,53 ----
  1215. X  
  1216. X  char telegram_file[PATHLEN];
  1217. X  
  1218. X! teleg_read(Playernum, type)
  1219. X  int Playernum;
  1220. X+ int type;
  1221. X  {
  1222. X      char *p;
  1223. X  
  1224. X+ switch(type) {
  1225. X+   case TELEGRAM:
  1226. X      sprintf(telegram_file,"%s.%d", TELEGRAMFL, Playernum);
  1227. X+     break;
  1228. X+   case DECLARATION:
  1229. X+     sprintf(telegram_file,"%s.%d", DECLARATIONFL, Playernum);
  1230. X+     break;
  1231. X+   case TRANSFER:
  1232. X+     sprintf(telegram_file,"%s.%d", TRANSFERFL, Playernum);
  1233. X+     break;
  1234. X+   case COMBAT:
  1235. X+     sprintf(telegram_file,"%s.%d", COMBATFL, Playernum);
  1236. X+     break;
  1237. X+   case ANNOUNCE:
  1238. X+     sprintf(telegram_file,"%s.%d", ANNOUNCEFL, Playernum);
  1239. X+     break;
  1240. X+   default: return;
  1241. X+ }
  1242. X+ 
  1243. X      if((teleg_read_fd = fopen(telegram_file, "r")) != 0) {
  1244. X      while(fgets(buf, sizeof buf, teleg_read_fd)) {
  1245. X          for(p = buf; *p; p++) if(*p == '\n') {
  1246. X*** /usr/cna/billr/games/gb3/server/relation.c    Wed May 30 15:13:45 1990
  1247. X--- server/relation.c    Thu Aug 23 16:55:26 1990
  1248. X***************
  1249. X*** 24,35 ****
  1250. X  {
  1251. X  int numraces;
  1252. X  int p;
  1253. X! racetype *r;
  1254. X  
  1255. X! free(Race);
  1256. X  openracedata(&relation_racedata);
  1257. X  getrace(relation_racedata, &Race, Playernum);
  1258. X-      numraces = Numraces();
  1259. X  
  1260. X      sprintf(buf,"\n              Racial Relations Report for %s\n\n",Race->name);
  1261. X          notify(Playernum, buf);
  1262. X--- 24,35 ----
  1263. X  {
  1264. X  int numraces;
  1265. X  int p;
  1266. X! racetype *r, *Race;
  1267. X  
  1268. X!      numraces = Numraces();
  1269. X! 
  1270. X  openracedata(&relation_racedata);
  1271. X  getrace(relation_racedata, &Race, Playernum);
  1272. X  
  1273. X      sprintf(buf,"\n              Racial Relations Report for %s\n\n",Race->name);
  1274. X          notify(Playernum, buf);
  1275. X***************
  1276. X*** 40,46 ****
  1277. X  if(argn==1) {
  1278. X  for (p=1; p<=numraces; p++)
  1279. X          if (p != Race->Playernum) {
  1280. X!             getrace(relation_racedata, &r, p);
  1281. X              sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s   %10s\n", p, 
  1282. X                    ((Race->God || Race->translate[p-1] > 30) && r->Thing) ? 
  1283. X                  "Meso" : "    ", Race->translate[p-1], r->name,
  1284. X--- 40,46 ----
  1285. X  if(argn==1) {
  1286. X  for (p=1; p<=numraces; p++)
  1287. X          if (p != Race->Playernum) {
  1288. X!             getrace(relation_racedata, &r, (int)p);
  1289. X              sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s   %10s\n", p, 
  1290. X                    ((Race->God || Race->translate[p-1] > 30) && r->Thing) ? 
  1291. X                  "Meso" : "    ", Race->translate[p-1], r->name,
  1292. X***************
  1293. X*** 51,58 ****
  1294. X              }
  1295. X          } else {
  1296. X  GetPlayer(args[1], &p, &r);
  1297. X! if(p==-1) {
  1298. X  notify(Playernum, "No such player.\n");
  1299. X  return;
  1300. X  }
  1301. X              sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s   %10s\n", p, 
  1302. X--- 51,59 ----
  1303. X              }
  1304. X          } else {
  1305. X  GetPlayer(args[1], &p, &r);
  1306. X! if(p < 1 || p > numraces) {
  1307. X  notify(Playernum, "No such player.\n");
  1308. X+ free(Race);
  1309. X  return;
  1310. X  }
  1311. X              sprintf(buf,"%2d %s (%3d%%) %20.20s : %10s   %10s\n", p, 
  1312. X***************
  1313. X*** 63,68 ****
  1314. X--- 64,70 ----
  1315. X          notify(Playernum, buf);
  1316. X              free(r);
  1317. X  }
  1318. X+ free(Race);
  1319. X  close_file(relation_racedata);
  1320. X  
  1321. X  
  1322. X*** /usr/cna/billr/games/gb3/server/shlmisc.c    Wed May 30 15:13:48 1990
  1323. X--- server/shlmisc.c    Thu Aug 23 16:55:29 1990
  1324. X***************
  1325. X*** 78,101 ****
  1326. X              *rnum = -1;
  1327. X              return;
  1328. X          } else {
  1329. X!     openracedata(&shl_racedata);
  1330. X              getrace(shl_racedata, race, *rnum);
  1331. X!     close_file(shl_racedata);
  1332. X              return;
  1333. X          }
  1334. X      } else {
  1335. X          l = strlen(name);
  1336. X!     openracedata(&shl_racedata);
  1337. X          for (i=1; !(*rnum) && i<=numraces; i++) {
  1338. X!             getrace(shl_racedata, race, i);
  1339. X              if (!strncmp(name, (*race)->name, l)) {
  1340. X                  *rnum = i;
  1341. X!             close_file(shl_racedata);
  1342. X                  return;
  1343. X!             } else
  1344. X                  free(*race);
  1345. X!         }
  1346. X!     close_file(shl_racedata);
  1347. X          *rnum = -1;
  1348. X      }
  1349. X  }
  1350. X--- 78,101 ----
  1351. X              *rnum = -1;
  1352. X              return;
  1353. X          } else {
  1354. X!                 openracedata(&shl_racedata);
  1355. X              getrace(shl_racedata, race, *rnum);
  1356. X!                     close_file(shl_racedata);
  1357. X              return;
  1358. X          }
  1359. X      } else {
  1360. X          l = strlen(name);
  1361. X!             openracedata(&shl_racedata);
  1362. X          for (i=1; !(*rnum) && i<=numraces; i++) {
  1363. X!             getrace(shl_racedata, race, (int)i);
  1364. X              if (!strncmp(name, (*race)->name, l)) {
  1365. X                  *rnum = i;
  1366. X!                 close_file(shl_racedata);
  1367. X                  return;
  1368. X!                 } else
  1369. X                  free(*race);
  1370. X!             }
  1371. X!         close_file(shl_racedata);
  1372. X          *rnum = -1;
  1373. X      }
  1374. X  }
  1375. X***************
  1376. X*** 134,140 ****
  1377. X      }
  1378. X  Sdata.AP[Playernum-1] -= alloc;
  1379. X       putsdata(stardatafile,&Sdata);
  1380. X!      getstar(stardatafile, &Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
  1381. X  Stars[Dir[Playernum-1].snum]->AP[Playernum-1] = MIN(99,Stars[Dir[Playernum-1].snum]->AP[Playernum-1]
  1382. X                        +alloc);
  1383. X       putstar(stardatafile, Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
  1384. X--- 134,141 ----
  1385. X      }
  1386. X  Sdata.AP[Playernum-1] -= alloc;
  1387. X       putsdata(stardatafile,&Sdata);
  1388. X! free(Stars[Dir[Playernum-1].snum]);
  1389. X! getstar(stardatafile, &Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
  1390. X  Stars[Dir[Playernum-1].snum]->AP[Playernum-1] = MIN(99,Stars[Dir[Playernum-1].snum]->AP[Playernum-1]
  1391. X                        +alloc);
  1392. X       putstar(stardatafile, Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
  1393. X***************
  1394. X*** 175,183 ****
  1395. X       }
  1396. X    } else {
  1397. X       getsdata(deductAPs_stardata,&Sdata);
  1398. X!      Sdata.AP[Playernum-1] -= n;
  1399. X!          if (Sdata.AP[Playernum-1] < 0)
  1400. X!          Sdata.AP[Playernum-1] = 0;
  1401. X       putsdata(deductAPs_stardata,&Sdata);
  1402. X  
  1403. X       if (Dir[Playernum-1].level==LEVEL_UNIV) {
  1404. X--- 176,182 ----
  1405. X       }
  1406. X    } else {
  1407. X       getsdata(deductAPs_stardata,&Sdata);
  1408. X!      Sdata.AP[Playernum-1] = MAX(0,Sdata.AP[Playernum-1]-n);
  1409. X       putsdata(deductAPs_stardata,&Sdata);
  1410. X  
  1411. X       if (Dir[Playernum-1].level==LEVEL_UNIV) {
  1412. X***************
  1413. X*** 239,244 ****
  1414. X--- 238,244 ----
  1415. X      break;
  1416. X      case LEVEL_STAR:
  1417. X      openstardata(&fix_stardata);
  1418. X+     free(Stars[Dir[Playernum-1].snum]);
  1419. X      getstar(fix_stardata, &Stars[Dir[Playernum-1].snum], Dir[Playernum-1].snum);
  1420. X      close_file(fix_stardata);
  1421. X      sh = Stars[Dir[Playernum-1].snum]->ships;
  1422. X***************
  1423. X*** 248,253 ****
  1424. X--- 248,254 ----
  1425. X      getplanet(fix_pdata, &p, Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
  1426. X      close_file(fix_pdata);
  1427. X      sh = p->ships;
  1428. X+     free(p);
  1429. X      break;
  1430. X      case LEVEL_SHIP:
  1431. X      sh = Dir[Playernum-1].shipno;
  1432. X*** /usr/cna/billr/games/gb3/server/shootblast.c    Wed May 30 15:13:49 1990
  1433. X--- server/shootblast.c    Thu Aug 23 16:55:30 1990
  1434. X***************
  1435. X*** 34,44 ****
  1436. X  char *msg;
  1437. X  int getmap;
  1438. X  {
  1439. X- shiptype *ship;
  1440. X  double xfrom,yfrom,xto,yto;
  1441. X  float nd;
  1442. X  int casualties;
  1443. X!  sprintf(msg,""); /* 'zero' it out */
  1444. X   if (from.level==LEVEL_PLAN) {
  1445. X     xfrom = Stars[from.snum]->xpos + fpl->xpos;
  1446. X     yfrom = Stars[from.snum]->ypos + fpl->ypos;
  1447. X--- 34,45 ----
  1448. X  char *msg;
  1449. X  int getmap;
  1450. X  {
  1451. X  double xfrom,yfrom,xto,yto;
  1452. X  float nd;
  1453. X  int casualties;
  1454. X! racetype *alien;
  1455. X! 
  1456. X! sprintf(msg,""); /* 'zero' it out */
  1457. X   if (from.level==LEVEL_PLAN) {
  1458. X     xfrom = Stars[from.snum]->xpos + fpl->xpos;
  1459. X     yfrom = Stars[from.snum]->ypos + fpl->ypos;
  1460. X***************
  1461. X*** 99,108 ****
  1462. X  
  1463. X       nd = blast(Playernum,&from, to, fromplayer, tpl, sectorx, sectory, *dist, tech,strength, getmap);
  1464. X  
  1465. X!      if (from.level==LEVEL_SHIP && from.shipptr->type==OTYPE_GR)
  1466. X      sprintf(buf,"%.0f points radiation damage given\n", nd);
  1467. X       else if (to->level==LEVEL_SHIP) {
  1468. X-         racetype *alien;
  1469. X          sprintf(buf,"%.0f%% total damage done\n", nd);
  1470. X  
  1471. X      str_cat(msg, buf);
  1472. X--- 100,109 ----
  1473. X  
  1474. X       nd = blast(Playernum,&from, to, fromplayer, tpl, sectorx, sectory, *dist, tech,strength, getmap);
  1475. X  
  1476. X!      if (from.level==LEVEL_SHIP && from.shipptr->type==OTYPE_GR 
  1477. X!     && !from.shipptr->mode)
  1478. X      sprintf(buf,"%.0f points radiation damage given\n", nd);
  1479. X       else if (to->level==LEVEL_SHIP) {
  1480. X          sprintf(buf,"%.0f%% total damage done\n", nd);
  1481. X  
  1482. X      str_cat(msg, buf);
  1483. X***************
  1484. X*** 116,126 ****
  1485. X              casualties = to->shipptr->popn;
  1486. X  
  1487. X            to->shipptr->popn -= casualties;
  1488. X          openracedata(&shoot_racedata);
  1489. X!           getrace(shoot_racedata, &alien, to->shipptr->owner);
  1490. X          close_file(shoot_racedata);
  1491. X            to->shipptr->mass -= casualties * alien->mass;
  1492. X            free(alien);
  1493. X            if (casualties) {
  1494. X              sprintf(buf,"%d crew casualties\n", casualties);
  1495. X          str_cat(msg, buf);
  1496. X--- 117,129 ----
  1497. X              casualties = to->shipptr->popn;
  1498. X  
  1499. X            to->shipptr->popn -= casualties;
  1500. X+ 
  1501. X          openracedata(&shoot_racedata);
  1502. X!           getrace(shoot_racedata, &alien, (int)to->shipptr->owner);
  1503. X          close_file(shoot_racedata);
  1504. X            to->shipptr->mass -= casualties * alien->mass;
  1505. X            free(alien);
  1506. X+           
  1507. X            if (casualties) {
  1508. X              sprintf(buf,"%d crew casualties\n", casualties);
  1509. X          str_cat(msg, buf);
  1510. X***************
  1511. X*** 157,165 ****
  1512. X  int getmap;        /* whether to get smap or not */
  1513. X  {
  1514. X  register int x2,y2;
  1515. X! reg float r;        /* radius of blast */
  1516. X  float d,damage,str;
  1517. X! int numdest = 0,lowx,lowy,hix,hiy,crithits,critdam,dam;
  1518. X  int arm,body,fevade,tevade,fspeed,tspeed;
  1519. X  int i, col, row, die, effect, kills;
  1520. X  register sectortype *s;
  1521. X--- 160,168 ----
  1522. X  int getmap;        /* whether to get smap or not */
  1523. X  {
  1524. X  register int x2,y2;
  1525. X! reg float r;        /* radius of blast/penetration probability*/
  1526. X  float d,damage,str;
  1527. X! int numdest = 0,lowx,lowy,hix,hiy,crithits,critdam,dam,penetrate,hits;
  1528. X  int arm,body,fevade,tevade,fspeed,tspeed;
  1529. X  int i, col, row, die, effect, kills;
  1530. X  register sectortype *s;
  1531. X***************
  1532. X*** 167,173 ****
  1533. X  sectortype *s2;
  1534. X  register float fac;
  1535. X  int shfdata,sectdata;
  1536. X! int checkcrit = 0;
  1537. X  
  1538. X   if (to->level==LEVEL_SHIP) {
  1539. X   
  1540. X--- 170,176 ----
  1541. X  sectortype *s2;
  1542. X  register float fac;
  1543. X  int shfdata,sectdata;
  1544. X! int checkcrit = 0, damage_multiplier;
  1545. X  
  1546. X   if (to->level==LEVEL_SHIP) {
  1547. X   
  1548. X***************
  1549. X*** 188,256 ****
  1550. X                  tspeed = to->shipptr->speed;
  1551. X                   tevade=to->shipptr->protect.evade;
  1552. X              }
  1553. X!     
  1554. X!     body =  Size(to->shipptr);
  1555. X  
  1556. X!     str = Num_hits(Playernum,dist,strength,tech,fevade,tevade,fspeed,tspeed,body);
  1557. X!     
  1558. X!     arm  =  Armor(to->shipptr);
  1559. X!     sprintf(buf,"NUMBER OF HITS: %.0f    ARMOR: %d    BODY: %d \n",
  1560. X!             str,arm,body);
  1561. X!         notify(Playernum, buf);
  1562. X!     
  1563. X!     numdest = round_rand (40.*((float)str - (float)arm)/(float)body) *
  1564. X!         (1 + 2*(to->shipptr->type == STYPE_MIRROR)); /*mirrors are easier to damage */ 
  1565. X  
  1566. X!     if(numdest < 0)
  1567. X!             numdest = 0;
  1568. X!     
  1569. X!     sprintf(buf,"%d %% structural damage inflicted! \n",numdest);
  1570. X!         notify(Playernum, buf);
  1571. X! /* evaluate critical hits */
  1572. X!     checkcrit = 1;
  1573. X  
  1574. X-     if(from->level == LEVEL_SHIP) {
  1575. X-         if((from->shipptr->type == OTYPE_GR) )
  1576. X-             checkcrit = 0;
  1577. X-     }
  1578. X  
  1579. X  
  1580. X!         if(checkcrit)
  1581. X!         {
  1582. X          critdam = 0;
  1583. X          crithits = 0;
  1584. X!         for(i=1; i<=str; i++)
  1585. X!             if(!int_rand(0, 15*body))                        
  1586. X!                 {
  1587. X                      crithits++;
  1588. X                      dam=int_rand(0,100);
  1589. X                      critdam += dam;
  1590. X                  }
  1591. X  
  1592. X!         if(critdam > 100)critdam = 100;
  1593. X!         if(crithits)
  1594. X!             {
  1595. X!                 sprintf(buf,"%d CRITICAL HIT(S) for %d %% additional damage!!!\n",
  1596. X                          crithits,critdam);
  1597. X          notify(Playernum, buf);
  1598. X!                 numdest += critdam;
  1599. X              }
  1600. X  
  1601. X          }
  1602. X  
  1603. X!     if (numdest < 0)   numdest = 0;
  1604. X!     else
  1605. X!     if (numdest > 100) numdest = 100; 
  1606. X  
  1607. X!     if (from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR) {
  1608. X          /* gamma-ray lasers irradiate targets */
  1609. X              to->shipptr->rad = numdest;
  1610. X!             if(int_rand(1,100) <= numdest) 
  1611. X                  to->shipptr->active = 0;
  1612. X      } else {
  1613. X  
  1614. X          if (to->shipptr->damage+numdest >= 100) {
  1615. X!             kill_ship(to->shipptr);
  1616. X               /* mess up the planet a bit. */
  1617. X          if (to->shipptr->type==OTYPE_TOXWC &&
  1618. X                  to->shipptr->whatorbits==LEVEL_PLAN)
  1619. X--- 191,290 ----
  1620. X                  tspeed = to->shipptr->speed;
  1621. X                   tevade=to->shipptr->protect.evade;
  1622. X              }
  1623. X!     if(from->level==LEVEL_SHIP)
  1624. X!         fac=tanh((double)((from->shipptr->tech+1.0)/(to->shipptr->tech+1.0)));
  1625. X!     else
  1626. X!         fac=tanh((double)((100.0+1.0)/(to->shipptr->tech+1.0)));
  1627. X  
  1628. X!     sprintf(buf, "fac = %f/%f\n", fac, to->shipptr->tech);
  1629. X!     notify(Playernum, buf);
  1630. X!     body=Size(to->shipptr);
  1631. X!     arm=Armor(to->shipptr);
  1632. X!     hits=Num_hits(Playernum,dist,strength,
  1633. X!             tech,fevade,tevade,fspeed,tspeed,body);
  1634. X!     penetrate = 0;
  1635. X!     r = 1.0;
  1636. X!     for(i=1; i<=arm; i++) r *= fac;
  1637. X  
  1638. X!     for(i=1; i<=hits; i++)    /* check to see how many hits penetrate */
  1639. X!         if(float_rand() <= r) penetrate += 1;
  1640. X  
  1641. X  
  1642. X+     switch(to->shipptr->type) {
  1643. X+         case STYPE_MIRROR:
  1644. X+         case STYPE_STATION:
  1645. X+         case STYPE_HABITAT:
  1646. X+             damage_multiplier = 2;
  1647. X+             break;
  1648. X+         case STYPE_CARGO:
  1649. X+         case STYPE_TANKER:
  1650. X+         case STYPE_ASS:
  1651. X+             damage_multiplier = 1;
  1652. X+             break;
  1653. X+         default:
  1654. X+             damage_multiplier = 0;
  1655. X+             break;
  1656. X+         }
  1657. X+     
  1658. X+     numdest = round_rand (40.*(float)penetrate/(float)body) *
  1659. X+         (1 + damage_multiplier);
  1660. X  
  1661. X!     sprintf(buf, "%d hits\n", hits);
  1662. X!     notify(Playernum, buf);
  1663. X!     if(hits) {
  1664. X!     sprintf(buf, "%d penetrated armor causing %d%% damage.\n",
  1665. X!         penetrate, numdest);
  1666. X!     notify(Playernum, buf);
  1667. X!         }
  1668. X!     if(!(from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR
  1669. X!             && !from->shipptr->mode)) {
  1670. X          critdam = 0;
  1671. X          crithits = 0;
  1672. X!         for(i=1; i<=penetrate; i++)
  1673. X!             if(!int_rand(0, body)) {
  1674. X                      crithits++;
  1675. X                      dam=int_rand(0,100);
  1676. X                      critdam += dam;
  1677. X                  }
  1678. X  
  1679. X!         critdam = MIN(100,critdam);
  1680. X!         if(crithits) {
  1681. X!         sprintf(buf,"%d CRITICAL HIT(S) for %d%% additional damage!\n",
  1682. X                          crithits,critdam);
  1683. X          notify(Playernum, buf);
  1684. X!         numdest += critdam;
  1685. X              }
  1686. X  
  1687. X          }
  1688. X  
  1689. X!     numdest=MIN(100,numdest);
  1690. X  
  1691. X!     if(!(from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR
  1692. X!             && !from->shipptr->mode)) {
  1693. X!         sprintf(buf,"%d%% total structural damage inflicted!\n",
  1694. X!             numdest);
  1695. X!             notify(Playernum, buf);
  1696. X!         } else {
  1697. X!         sprintf(buf,"%d%% total radiation level inflicted!\n",numdest);
  1698. X!             notify(Playernum, buf);
  1699. X!         }
  1700. X! 
  1701. X!     if (from->level==LEVEL_SHIP && from->shipptr->type==OTYPE_GR
  1702. X!             && !from->shipptr->mode) {
  1703. X          /* gamma-ray lasers irradiate targets */
  1704. X+         if(numdest > to->shipptr->rad)
  1705. X              to->shipptr->rad = numdest;
  1706. X! 
  1707. X!         if(int_rand(1,100) <= numdest) 
  1708. X                  to->shipptr->active = 0;
  1709. X+         if(!to->shipptr->active) {
  1710. X+             notify(Playernum, "Target ship INACTIVE.\n");
  1711. X+             }
  1712. X+ 
  1713. X      } else {
  1714. X  
  1715. X          if (to->shipptr->damage+numdest >= 100) {
  1716. X!             kill_ship(Playernum, to->shipptr);
  1717. X               /* mess up the planet a bit. */
  1718. X          if (to->shipptr->type==OTYPE_TOXWC &&
  1719. X                  to->shipptr->whatorbits==LEVEL_PLAN)
  1720. X***************
  1721. X*** 270,277 ****
  1722. X                  to->shipptr->whatdest = LEVEL_UNIV;
  1723. X                  to->shipptr->destshipno = 0;
  1724. X      }
  1725. X!          } else
  1726. X             to->shipptr->damage += numdest;
  1727. X      }
  1728. X      
  1729. X      Nuked[to->shipptr->owner-1] = 1;
  1730. X--- 304,314 ----
  1731. X                  to->shipptr->whatdest = LEVEL_UNIV;
  1732. X                  to->shipptr->destshipno = 0;
  1733. X      }
  1734. X!          } else {
  1735. X             to->shipptr->damage += numdest;
  1736. X+     sprintf(buf, "%d%% total damage.\n", to->shipptr->damage);
  1737. X+     notify(Playernum, buf);
  1738. X+         }
  1739. X      }
  1740. X      
  1741. X      Nuked[to->shipptr->owner-1] = 1;
  1742. X***************
  1743. X*** 296,309 ****
  1744. X           for (x2=lowx; x2<=hix; x2++) {
  1745. X        if ( (d = Distmap(x,y,x2,y2) ) <= r) {
  1746. X           s = &Sector(*pl,x2,y2);
  1747. X!          fac = ((float)str) * logscale(100 - s->mobilization)/(d+1);
  1748. X!         /* factor of destruction */
  1749. X          /* printf("%d,%d  dist = %.2f,dest fac %.2f \n",x2,y2,d,fac);*/
  1750. X               if (fac > 1.0) {
  1751. X-                Nuked[s->owner-1] = 1;    /* for retaliating */
  1752. X                          
  1753. X              kills = int_rand(0,((int)fac))/(1+(s->des==DES_PLATED));
  1754. X!         if(kills >= s->popn)
  1755. X              {
  1756. X                s->popn = 0;
  1757. X                s->owner = 0;
  1758. X--- 333,350 ----
  1759. X           for (x2=lowx; x2<=hix; x2++) {
  1760. X        if ( (d = Distmap(x,y,x2,y2) ) <= r) {
  1761. X           s = &Sector(*pl,x2,y2);
  1762. X!          fac = (float)str * log10(100.0 - (float)s->mobilization + 2.0)
  1763. X!          /(d+1.);
  1764. X! 
  1765. X!         /* factor of destruction */
  1766. X          /* printf("%d,%d  dist = %.2f,dest fac %.2f \n",x2,y2,d,fac);*/
  1767. X               if (fac > 1.0) {
  1768. X                          
  1769. X              kills = int_rand(0,((int)fac))/(1+(s->des==DES_PLATED));
  1770. X!             if(kills >= int_rand(1,100))
  1771. X!                Nuked[s->owner-1] = 1;    /* for retaliating */
  1772. X! 
  1773. X!             if(kills >= s->popn)
  1774. X              {
  1775. X                s->popn = 0;
  1776. X                s->owner = 0;
  1777. X***************
  1778. X*** 329,342 ****
  1779. X                  (s+1)->des==DES_GAS || (s-1)->des==DES_GAS)
  1780. X                      s->des=DES_GAS;
  1781. X          }
  1782. X!                     if(fac >= 5.0)
  1783. X!                 if(((float)int_rand(0,10))*fac > 50.0)
  1784. X!                     {
  1785. X                  s->popn = 0;
  1786. X                  s->owner = 0;
  1787. X                  s->eff = 0;
  1788. X                  s->mobilization = 0;
  1789. X                  s->fert = 0; /*all is lost !*/
  1790. X                  s->is_wasted = 1;
  1791. X                  numdest++;
  1792. X                      }
  1793. X--- 370,385 ----
  1794. X                  (s+1)->des==DES_GAS || (s-1)->des==DES_GAS)
  1795. X                      s->des=DES_GAS;
  1796. X          }
  1797. X!             
  1798. X!             if( (int)fac >= int_rand(0,100) ) {
  1799. X!                     if(s->owner) Nuked[s->owner-1] = 1;
  1800. X! 
  1801. X                  s->popn = 0;
  1802. X                  s->owner = 0;
  1803. X                  s->eff = 0;
  1804. X                  s->mobilization = 0;
  1805. X                  s->fert = 0; /*all is lost !*/
  1806. X+                 s->crystals = int_rand(0, s->crystals);
  1807. X                  s->is_wasted = 1;
  1808. X                  numdest++;
  1809. X                      }
  1810. X*** /usr/cna/billr/games/gb3/server/survey.c    Wed May 30 15:13:51 1990
  1811. X--- server/survey.c    Thu Aug 23 16:55:32 1990
  1812. X***************
  1813. X*** 30,38 ****
  1814. X      "Stage 8: ecologically poisonous --below birth threshold", 
  1815. X      "Stage 9: WARNING: nearing 100% toxicity",
  1816. X      "Stage 10: WARNING: COMPLETELY TOXIC!!!",
  1817. X!     "???"
  1818. X  };
  1819. X! int survey_racedata;
  1820. X  
  1821. X  
  1822. X  survey(Playernum,APcount, argn,args)
  1823. X--- 30,38 ----
  1824. X      "Stage 8: ecologically poisonous --below birth threshold", 
  1825. X      "Stage 9: WARNING: nearing 100% toxicity",
  1826. X      "Stage 10: WARNING: COMPLETELY TOXIC!!!",
  1827. X!     "\?\?\?"
  1828. X  };
  1829. X! int survey_racedata, survey_pdata, survey_sectdata;
  1830. X  
  1831. X  
  1832. X  survey(Playernum,APcount, argn,args)
  1833. X***************
  1834. X*** 45,53 ****
  1835. X  char d;
  1836. X  sectortype *s;
  1837. X  planettype *p;
  1838. X! int tindex,survey_pdata,survey_sectdata;
  1839. X  placetype where;
  1840. X  float compat;
  1841. X  
  1842. X  if (argn==1) {   /* no args */
  1843. X  
  1844. X--- 45,54 ----
  1845. X  char d;
  1846. X  sectortype *s;
  1847. X  planettype *p;
  1848. X! int tindex;
  1849. X  placetype where;
  1850. X  float compat;
  1851. X+ racetype *Race;
  1852. X  
  1853. X  if (argn==1) {   /* no args */
  1854. X  
  1855. X***************
  1856. X*** 76,82 ****
  1857. X  
  1858. X  }
  1859. X  
  1860. X- free(Race);
  1861. X  openracedata(&survey_racedata);
  1862. X  getrace(survey_racedata, &Race, Playernum);
  1863. X  close_file(survey_racedata);
  1864. X--- 77,82 ----
  1865. X***************
  1866. X*** 83,89 ****
  1867. X  
  1868. X  if (where.level==LEVEL_PLAN) {
  1869. X  
  1870. X- 
  1871. X    openpdata(&survey_pdata);
  1872. X    getplanet(survey_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
  1873. X    close_file(survey_pdata);
  1874. X--- 83,88 ----
  1875. X***************
  1876. X*** 104,110 ****
  1877. X      lowy = MAX(0, lowy);
  1878. X      hiy = MIN(hiy, p->Maxy-1);
  1879. X  
  1880. X!     sprintf(buf," x,y des (    type   )  owner eff mob frt res popn ^popn\n");
  1881. X              notify(Playernum, buf);
  1882. X  
  1883. X      for (; lowy<=hiy; lowy++)
  1884. X--- 103,109 ----
  1885. X      lowy = MAX(0, lowy);
  1886. X      hiy = MIN(hiy, p->Maxy-1);
  1887. X  
  1888. X!     sprintf(buf," x,y des (    type   )  owner eff mob frt res popn ^popn crystals\n");
  1889. X              notify(Playernum, buf);
  1890. X  
  1891. X      for (; lowy<=hiy; lowy++)
  1892. X***************
  1893. X*** 117,130 ****
  1894. X               sprintf(buf,"?  (     ?     )\n");
  1895. X              notify(Playernum, buf);
  1896. X              } else {
  1897. X!                     sprintf(buf,"%c  (%11s) %6u%4u%4u%4u%4u%5u%6d\n",
  1898. X              d, Desnames[s->des], s->owner, s->eff,
  1899. X              s->mobilization, s->fert, s->resource, s->popn,
  1900. X!             maxsupport(Race,s,compat,p->conditions[TOXIC]) );
  1901. X              notify(Playernum, buf);
  1902. X          }
  1903. X       }
  1904. X-     free(p);
  1905. X  
  1906. X    } else {
  1907. X  
  1908. X--- 116,129 ----
  1909. X               sprintf(buf,"?  (     ?     )\n");
  1910. X              notify(Playernum, buf);
  1911. X              } else {
  1912. X!                     sprintf(buf,"%c  (%11s) %6u%4u%4u%4u%4u%5u%6d%s\n",
  1913. X              d, Desnames[s->des], s->owner, s->eff,
  1914. X              s->mobilization, s->fert, s->resource, s->popn,
  1915. X!             maxsupport(Race,s,compat,p->conditions[TOXIC]),
  1916. X!             (s->crystals ? " yes" : " " ));
  1917. X              notify(Playernum, buf);
  1918. X          }
  1919. X       }
  1920. X  
  1921. X    } else {
  1922. X  
  1923. X***************
  1924. X*** 186,195 ****
  1925. X          sprintf(buf,"This planet ENSLAVED to player %d!\n", p->slaved_to);
  1926. X              notify(Playernum, buf);
  1927. X          }
  1928. X      free(p);
  1929. X  
  1930. X-   }
  1931. X- 
  1932. X   } else if (where.level==LEVEL_STAR) {
  1933. X  
  1934. X    sprintf(buf,"Star %s\n",Stars[where.snum]->name);
  1935. X--- 185,193 ----
  1936. X          sprintf(buf,"This planet ENSLAVED to player %d!\n", p->slaved_to);
  1937. X              notify(Playernum, buf);
  1938. X          }
  1939. X+   }
  1940. X      free(p);
  1941. X  
  1942. X   } else if (where.level==LEVEL_STAR) {
  1943. X  
  1944. X    sprintf(buf,"Star %s\n",Stars[where.snum]->name);
  1945. X***************
  1946. X*** 227,233 ****
  1947. X--- 225,371 ----
  1948. X              notify(Playernum, buf);
  1949. X  
  1950. X  } else {
  1951. X+     sprintf(buf,"Illegal scope.\n");
  1952. X+             notify(Playernum, buf);
  1953. X+     }
  1954. X+ free(Race);
  1955. X+ }
  1956. X+ 
  1957. X+ production(Playernum,APcount, argn,args)
  1958. X+ int Playernum;
  1959. X+ int APcount;
  1960. X+ int argn;
  1961. X+ char args[MAXARGS][COMMANDSIZE];
  1962. X+ {
  1963. X+ planettype *p;
  1964. X+ 
  1965. X+     if(Dir[Playernum-1].level != LEVEL_PLAN) {
  1966. X+         notify(Playernum, "You have to 'cs' to an explored planet to get this data.\n");
  1967. X+         return;
  1968. X+         }
  1969. X+       openpdata(&survey_pdata);
  1970. X+       getplanet(survey_pdata,&p,Stars[Dir[Playernum-1].snum]->planetpos[Dir[Playernum-1].pnum]);
  1971. X+       close_file(survey_pdata);
  1972. X+     sprintf(buf, "Last update this planet produced %dr  %df  %dd.\n", p->info[Playernum-1].prod_res,
  1973. X+     p->info[Playernum-1].prod_fuel, p->info[Playernum-1].prod_dest);
  1974. X+     notify(Playernum, buf);
  1975. X+     free(p);
  1976. X+ 
  1977. X+ }
  1978. X+ 
  1979. X+ 
  1980. X+ repair(Playernum,APcount, argn,args)
  1981. X+ int Playernum;
  1982. X+ int APcount;
  1983. X+ int argn;
  1984. X+ char args[MAXARGS][COMMANDSIZE];
  1985. X+ {
  1986. X+ int lowx,hix,lowy,hiy,x2, ok, sectors, cost;
  1987. X+ sectortype *s;
  1988. X+ planettype *p;
  1989. X+ placetype where;
  1990. X+ racetype *Race;
  1991. X+ 
  1992. X+ if (argn==1) {   /* no args */
  1993. X+ 
  1994. X+     where.level = Dir[Playernum-1].level;
  1995. X+     where.snum = Dir[Playernum-1].snum;
  1996. X+     where.pnum = Dir[Playernum-1].pnum;
  1997. X+ 
  1998. X+ } else {
  1999. X+ 
  2000. X+         /* repairing a sector */
  2001. X+     if (isdigit(args[1][0]) && index(args[1],',')!=NULL) {
  2002. X+         if (Dir[Playernum-1].level!=LEVEL_PLAN) {
  2003. X+             sprintf(buf,"There are no sectors here.\n");
  2004. X+             notify(Playernum, buf);
  2005. X+             return;
  2006. X+         } else {
  2007. X+             where.level = LEVEL_PLAN;
  2008. X+             where.snum = Dir[Playernum-1].snum;
  2009. X+             where.pnum = Dir[Playernum-1].pnum;
  2010. X+         }
  2011. X+     } else {
  2012. X+         where = Getplace(Playernum,args[1],0);
  2013. X+         if (where.err)
  2014. X+             return;
  2015. X+     }
  2016. X+ 
  2017. X+ }
  2018. X+ 
  2019. X+ openracedata(&survey_racedata);
  2020. X+ getrace(survey_racedata, &Race, Playernum);
  2021. X+ close_file(survey_racedata);
  2022. X+ 
  2023. X+ if (where.level==LEVEL_PLAN) {
  2024. X+ 
  2025. X+ 
  2026. X+   openpdata(&survey_pdata);
  2027. X+   getplanet(survey_pdata,&p,Stars[where.snum]->planetpos[where.pnum]);
  2028. X+   close_file(survey_pdata);
  2029. X+ 
  2030. X+ if(!p->info[Playernum-1].numsectsowned) {
  2031. X+     notify(Playernum, "You don't own any sectors on this planet.\n");
  2032. X+     free(p);
  2033. X+     free(Race);
  2034. X+     return;
  2035. X+     } 
  2036. X+ 
  2037. X+     opensectdata(&survey_sectdata);
  2038. X+     getsmap(survey_sectdata,Smap,p);
  2039. X+     close_file(survey_sectdata);
  2040. X+ 
  2041. X+   if (isdigit(args[1][0]) && index(args[1],',')!=NULL) {
  2042. X+     get4args(args[1],&x2,&hix,&lowy,&hiy); 
  2043. X+             /* ^^^ translate from lowx:hix,lowy:hiy */
  2044. X+     x2 = MAX(0, x2);
  2045. X+     hix = MIN(hix, p->Maxx-1);
  2046. X+     lowy = MAX(0, lowy);
  2047. X+     hiy = MIN(hiy, p->Maxy-1);
  2048. X+ 
  2049. X+   } else {
  2050. X+     /* repair entire planet */
  2051. X+     x2 = 0;
  2052. X+     hix = p->Maxx-1;
  2053. X+     lowy = 0;
  2054. X+     hiy = p->Maxy-1;
  2055. X+     }
  2056. X+ 
  2057. X+     sectors = 0;
  2058. X+     cost = 0;
  2059. X+ 
  2060. X+     opensectdata(&survey_sectdata);
  2061. X+     for (; lowy<=hiy; lowy++)
  2062. X+          for (lowx=x2; lowx<=hix; lowx++) {
  2063. X+             if(p->info[Playernum-1].resource >= SECTOR_REPAIR_COST) {
  2064. X+               s = &Sector(*p, lowx, lowy);
  2065. X+               if (s->is_wasted && (s->owner==Playernum || !s->owner)){
  2066. X+                 s->is_wasted = 0;
  2067. X+                 s->fert = MIN(100, s->fert+20);
  2068. X+                 p->info[Playernum-1].resource -= SECTOR_REPAIR_COST;
  2069. X+                 cost += SECTOR_REPAIR_COST;
  2070. X+                 sectors += 1;
  2071. X+                    putsector(survey_sectdata, s, p->sectormappos
  2072. X+                     +(lowy*p->Maxx+lowx)*sizeof(sectortype) );
  2073. X+                 }
  2074. X+                 } 
  2075. X+      }
  2076. X+     close_file(survey_sectdata);
  2077. X+ 
  2078. X+       openpdata(&survey_pdata);
  2079. X+       putplanet(survey_pdata,p,Stars[where.snum]->planetpos[where.pnum]);
  2080. X+       close_file(survey_pdata);
  2081. X+     free(p);
  2082. X+ 
  2083. X+         sprintf(buf, "%d sectors repaired at a cost of %d resources.\n", sectors, cost);
  2084. X+         notify(Playernum, buf);
  2085. X+ 
  2086. X+  }  else {
  2087. X      sprintf(buf,"scope must be a planet.\n");
  2088. X              notify(Playernum, buf);
  2089. X      }
  2090. X+ free(Race);
  2091. X  }
  2092. X+ 
  2093. X+ 
  2094. X+ 
  2095. X*** /usr/cna/billr/games/gb3/server/tweakables.h    Wed May 30 15:12:45 1990
  2096. X--- server/tweakables.h    Tue Aug 28 12:05:35 1990
  2097. X***************
  2098. X*** 48,53 ****
  2099. X--- 48,54 ----
  2100. X  #define CHAR_GAS         '~'
  2101. X  #define CHAR_CLOAKED         ' '
  2102. X  #define CHAR_ICE        '#'
  2103. X+ #define CHAR_CRYSTAL        'x'
  2104. X  
  2105. X  #define NAMESIZE 18
  2106. X  #define RNAMESIZE 35
  2107. X***************
  2108. X*** 68,73 ****
  2109. X--- 69,76 ----
  2110. X  #define SYSTEMSIZE    2000
  2111. X  #define PLORBITSIZE    50
  2112. X  
  2113. X+ #define WEEKLY        300
  2114. X+ #define DAILY        180
  2115. X  
  2116. X  #define AUTO_TELEG_SIZE        2000
  2117. X  #define UNTRANS_MSG        "[ ? ]"
  2118. X***************
  2119. X*** 90,96 ****
  2120. X  #define LAND_GRAV_MASS_FACTOR 0.29
  2121. X  
  2122. X  #define FUEL_GAS_ADD 5.0    /* amt of fuel to add to ea ships tanks */
  2123. X! #define FUEL_GAS_ADD_TANKER 10.0
  2124. X  #define FUEL_GAS_ADD_HABITAT 20.0
  2125. X  #define FUEL_GAS_ADD_STATION 20.0
  2126. X  #define FUEL_USE 0.02        /* fuel use per ship mass pt. per speed
  2127. X--- 93,99 ----
  2128. X  #define LAND_GRAV_MASS_FACTOR 0.29
  2129. X  
  2130. X  #define FUEL_GAS_ADD 5.0    /* amt of fuel to add to ea ships tanks */
  2131. X! #define FUEL_GAS_ADD_TANKER 100.0
  2132. X  #define FUEL_GAS_ADD_HABITAT 20.0
  2133. X  #define FUEL_GAS_ADD_STATION 20.0
  2134. X  #define FUEL_USE 0.02        /* fuel use per ship mass pt. per speed
  2135. X***************
  2136. X*** 97,104 ****
  2137. X                     factor */
  2138. X  
  2139. X  #define REPAIR_RATE 25.0    /* rate at which ships get repaired */
  2140. X  
  2141. X- 
  2142. X  #define CREAT_UNIV_ITERAT 10    /* iterations for star movement */
  2143. X  
  2144. X  
  2145. X--- 100,107 ----
  2146. X                     factor */
  2147. X  
  2148. X  #define REPAIR_RATE 25.0    /* rate at which ships get repaired */
  2149. X+ #define SECTOR_REPAIR_COST 10 /* how much it costs to remove a wasted status from a sector */
  2150. X  
  2151. X  #define CREAT_UNIV_ITERAT 10    /* iterations for star movement */
  2152. X  
  2153. X  
  2154. X***************
  2155. X*** 109,124 ****
  2156. X                     /* # of people/fert pt sector supports*/
  2157. X  #define EFF_PROD         0.20        /* production of effcncy/pop*/
  2158. X  #define RESOURCE_PRODUCTION     0.00008 /* adjust these to change prod*/
  2159. X! #define FUEL_PRODUCTION        0.00004
  2160. X  
  2161. X  #define DEST_PRODUCTION     0.00008
  2162. X  #define POPN_PROD        0.3
  2163. X  
  2164. X  #define HYPER_DRIVE_READY_CHARGE 1
  2165. X! #define HYPER_DRIVE_FUEL_USE 1.0
  2166. X! #define HYPER_DIST_FACTOR 20000.
  2167. X  
  2168. X! #define TECH_INVEST        0.10    /* invest factor */
  2169. X  
  2170. X  #define MOB_COST        0.010   /* mobiliz.c, doplanet.c cost/mob points*/
  2171. X  /*#define RESOURCE_DEPLETION     0.015 */
  2172. X--- 112,129 ----
  2173. X                     /* # of people/fert pt sector supports*/
  2174. X  #define EFF_PROD         0.20        /* production of effcncy/pop*/
  2175. X  #define RESOURCE_PRODUCTION     0.00008 /* adjust these to change prod*/
  2176. X! #define FUEL_PRODUCTION        0.00008
  2177. X  
  2178. X  #define DEST_PRODUCTION     0.00008
  2179. X  #define POPN_PROD        0.3
  2180. X  
  2181. X  #define HYPER_DRIVE_READY_CHARGE 1
  2182. X! #define HYPER_DRIVE_FUEL_USE 5.0
  2183. X! #define HYPER_DIST_FACTOR 200.0
  2184. X  
  2185. X! #define TECH_LASER        100.0        /* minimum tech for constructing lasers */
  2186. X! #define TECH_INVEST        0.005    /* invest factor */
  2187. X! #define TECH_SCALE        2.0 /* investment scale */
  2188. X  
  2189. X  #define MOB_COST        0.010   /* mobiliz.c, doplanet.c cost/mob points*/
  2190. X  /*#define RESOURCE_DEPLETION     0.015 */
  2191. X***************
  2192. X*** 141,148 ****
  2193. X  
  2194. X  
  2195. X  #define FUEL_MANEUVER    0.3    /* order.c-- fuel it costs to change aim */
  2196. X! #define DIST_TO_LAND     10.0     /* moveship.c,land.c -- 
  2197. X!                    distance ship has to be to land */
  2198. X  /*#define DIST_TO_BURN 50     /* distance from sun needed to destroy ship */
  2199. X  
  2200. X  
  2201. X--- 146,154 ----
  2202. X  
  2203. X  
  2204. X  #define FUEL_MANEUVER    0.3    /* order.c-- fuel it costs to change aim */
  2205. X! #define DIST_TO_LAND     10.0     /* moveship.c,land.c -- */
  2206. X! #define DIST_TO_DOCK     45.0     
  2207. X! 
  2208. X  /*#define DIST_TO_BURN 50     /* distance from sun needed to destroy ship */
  2209. X  
  2210. X  
  2211. X***************
  2212. X*** 154,160 ****
  2213. X  #define POPN_MOVE_SCALE_1 400        /* limit at which popn moves to all */
  2214. X  #define POPN_MOVE_SCALE_2 3000        /* " " " popn moves to 2 adj. spaces */
  2215. X                      /* otherwise move to only 1 adj. space*/
  2216. X! #define SHIP_MOVE_SCALE 1.0
  2217. X  
  2218. X  #define reg register
  2219. X   /* to save object code */
  2220. X--- 160,166 ----
  2221. X  #define POPN_MOVE_SCALE_1 400        /* limit at which popn moves to all */
  2222. X  #define POPN_MOVE_SCALE_2 3000        /* " " " popn moves to 2 adj. spaces */
  2223. X                      /* otherwise move to only 1 adj. space*/
  2224. X! #define SHIP_MOVE_SCALE 3.0
  2225. X  
  2226. X  #define reg register
  2227. X   /* to save object code */
  2228. X***************
  2229. X*** 172,177 ****
  2230. X--- 178,187 ----
  2231. X  #define    swap(a, b)  ((a) ^= (b), (b) ^= (a), (a) ^= (b))
  2232. X   /* euclidean distance */
  2233. X  #define Distsq(x1,y1,x2,y2) ( ((x1)-(x2))*((x1)-(x2)) + ((y1)-(y2))*((y1)-(y2)) )
  2234. X+ #ifdef NO_LOG1P
  2235. X+ /* log(x+1) */
  2236. X+ #define log1p(x) ( log((x) + 1.0) )
  2237. X+ #endif
  2238. X  
  2239. X  /* look up sector */
  2240. X  #define Sector(pl,x,y) (Smap[(x) + (y)*(pl).Maxx])
  2241. X*** /usr/cna/billr/games/gb3/server/vars.h    Wed May 30 15:12:46 1990
  2242. X--- server/vars.h    Thu Aug 23 16:54:30 1990
  2243. X***************
  2244. X*** 41,58 ****
  2245. X        unsigned short fuel;        /* fuel for powering things */
  2246. X        unsigned short destruct;       /* destructive potential */
  2247. X        unsigned short resource;        /* resources in storage */
  2248. X!       unsigned short numsectsowned;
  2249. X  
  2250. X        unsigned comread : 7;        /* combat readiness (mobilization)*/
  2251. X        unsigned explored : 1;        /* 1 bit: explored by each player */
  2252. X        unsigned mob_set : 7;        /* mobilization target */
  2253. X        unsigned autorep : 1;        /* player wants autoreport */
  2254. X-       unsigned tech_invest : 7;        /* amt of res. to spend on tech */
  2255. X        unsigned spied_on : 1;        /* spied on */
  2256. X        unsigned tox_thresh : 7;        /* min to build a waste can */
  2257. X-       unsigned dummy : 1;    /* dummy bit for development */
  2258. X  
  2259. X!       unsigned int unused;     /* more dummy bits for development */
  2260. X    };
  2261. X  
  2262. X  struct sector {
  2263. X--- 41,69 ----
  2264. X        unsigned short fuel;        /* fuel for powering things */
  2265. X        unsigned short destruct;       /* destructive potential */
  2266. X        unsigned short resource;        /* resources in storage */
  2267. X!       unsigned popn;
  2268. X!       unsigned short crystals;
  2269. X  
  2270. X+       unsigned tech_invest;
  2271. X+ 
  2272. X+       unsigned short prod_res;    /* shows last update production */
  2273. X+       unsigned short prod_fuel;
  2274. X+       unsigned short prod_dest;
  2275. X+       unsigned short prod_crystals;
  2276. X+       float prod_tech;
  2277. X+       
  2278. X+       unsigned numsectsowned : 9;
  2279. X        unsigned comread : 7;        /* combat readiness (mobilization)*/
  2280. X        unsigned explored : 1;        /* 1 bit: explored by each player */
  2281. X        unsigned mob_set : 7;        /* mobilization target */
  2282. X        unsigned autorep : 1;        /* player wants autoreport */
  2283. X        unsigned spied_on : 1;        /* spied on */
  2284. X        unsigned tox_thresh : 7;        /* min to build a waste can */
  2285. X  
  2286. X!       unsigned dummy1;
  2287. X!       unsigned dummy2;
  2288. X!       unsigned dummy3;
  2289. X!       unsigned dummy4;
  2290. X    };
  2291. X  
  2292. X  struct sector {
  2293. X***************
  2294. X*** 66,72 ****
  2295. X      unsigned owner : BITS_MAXPLAYERS;    /* owner of place */
  2296. X      unsigned is_wasted : 1;    /* 1 bit: is a wasted sector */
  2297. X      unsigned VN : 1;        /* has a VN machine on it */
  2298. X!     unsigned dummy : 6; /* extra bits for development */
  2299. X  };
  2300. X  
  2301. X  
  2302. X--- 77,85 ----
  2303. X      unsigned owner : BITS_MAXPLAYERS;    /* owner of place */
  2304. X      unsigned is_wasted : 1;    /* 1 bit: is a wasted sector */
  2305. X      unsigned VN : 1;        /* has a VN machine on it */
  2306. X!     unsigned crystals : 6; /* number of crystals the sector currently has (these are mined out) */
  2307. X! 
  2308. X!     unsigned short dummy;
  2309. X  };
  2310. X  
  2311. X  
  2312. X***************
  2313. X*** 116,124 ****
  2314. X      percent AP[MAXPLAYERS];    /* Action pts for each player */
  2315. X      unsigned short VN_hitlist[MAXPLAYERS];     
  2316. X              /* # of ships destroyed by each player */
  2317. X!     percent VN_index1[MAXPLAYERS];
  2318. X!     percent VN_index2[MAXPLAYERS];    /* VN's record of destroyed ships
  2319. X                         systems where they bought it */
  2320. X  };
  2321. X  
  2322. X  EXTERN struct stardata Sdata;
  2323. X--- 129,138 ----
  2324. X      percent AP[MAXPLAYERS];    /* Action pts for each player */
  2325. X      unsigned short VN_hitlist[MAXPLAYERS];     
  2326. X              /* # of ships destroyed by each player */
  2327. X!     char VN_index1[MAXPLAYERS];
  2328. X!     char VN_index2[MAXPLAYERS];    /* VN's record of destroyed ships
  2329. X                         systems where they bought it */
  2330. X+     unsigned dummy;
  2331. X  };
  2332. X  
  2333. X  EXTERN struct stardata Sdata;
  2334. X***************
  2335. X*** 150,155 ****
  2336. X--- 164,170 ----
  2337. X  
  2338. X  EXTERN int tot_resdep, prod_eff, prod_res[MAXPLAYERS];
  2339. X  EXTERN int prod_fuel[MAXPLAYERS], prod_destruct[MAXPLAYERS];
  2340. X+ EXTERN int prod_crystals[MAXPLAYERS];
  2341. X  EXTERN int tot_captured, prod_mob, populations[MAXPLAYERS];
  2342. X  EXTERN float avg_mob[MAXPLAYERS];
  2343. X  EXTERN char sects_gained[MAXPLAYERS], sects_lost[MAXPLAYERS];
  2344. X***************
  2345. X*** 156,161 ****
  2346. X--- 171,178 ----
  2347. X  EXTERN boolean Claims;
  2348. X  
  2349. X  EXTERN planettype *planets[NUMSTARS][MAXPLANETS];
  2350. X+ EXTERN int inhabited[NUMSTARS];
  2351. X+ EXTERN int place[MAXPLAYERS];
  2352. X  EXTERN float Compat[MAXPLAYERS];
  2353. X  EXTERN int Num_races, Num_ships;
  2354. X  
  2355. END_OF_FILE
  2356. if test 57315 -ne `wc -c <'patches02c'`; then
  2357.     echo shar: \"'patches02c'\" unpacked with wrong size!
  2358. fi
  2359. # end of 'patches02c'
  2360. if test -f 'server/welcome.txt' -a "${1}" != "-c" ; then 
  2361.   echo shar: Renaming existing file \"'server/welcome.txt'\" to \"'server/welcome.txt.orig'\"
  2362.   mv -f 'server/welcome.txt' 'server/welcome.txt.orig'
  2363. fi
  2364. echo shar: Extracting \"'server/welcome.txt'\" \(560 characters\)
  2365. sed "s/^X//" >'server/welcome.txt' <<'END_OF_FILE'
  2366. X
  2367. X        *** Connected to the GB server ***
  2368. X
  2369. XThe client/server source/docs can be obtained via anon 
  2370. X    ftp from 'scam.berkeley.edu' (128.32.138.0)
  2371. X    in src/games/gb.
  2372. X
  2373. XType 'who' to see who is currently logged on. Type' help' for help.
  2374. X
  2375. X**** UPDATES HAVE BEEN SET AT 6 HOURS! (12 & 6 am/pm PDT)
  2376. X
  2377. X*** Do 'help time' for some new information ***
  2378. X
  2379. XNew command 'standby'. Do 'help standby' for details.
  2380. X
  2381. XNew newsgroup 'alt.games.gb' is for real.
  2382. X    Check it out if you can get it.
  2383. X
  2384. X>>> NEW news! do 'read news' and 'help read' for details.
  2385. X
  2386. XPlease enter your password.
  2387. END_OF_FILE
  2388. if test 560 -ne `wc -c <'server/welcome.txt'`; then
  2389.     echo shar: \"'server/welcome.txt'\" unpacked with wrong size!
  2390. fi
  2391. # end of 'server/welcome.txt'
  2392. echo shar: End of archive 3 \(of 9\).
  2393. cp /dev/null ark3isdone
  2394. MISSING=""
  2395. for I in 1 2 3 4 5 6 7 8 9 ; do
  2396.     if test ! -f ark${I}isdone ; then
  2397.     MISSING="${MISSING} ${I}"
  2398.     fi
  2399. done
  2400. if test "${MISSING}" = "" ; then
  2401.     echo You have unpacked all 9 archives.
  2402.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2403. else
  2404.     echo You still need to unpack the following archives:
  2405.     echo "        " ${MISSING}
  2406. fi
  2407. ##  End of shell archive.
  2408. exit 0
  2409.